Skip to content

Conversation

@tmichaeldb
Copy link
Contributor

This PR adds support for preprocessing knowledge base documents two ways:

  1. TextChunkingConfig to split loaded documents into chunks before embedding
  2. ContextualConfig to support Contextual Retrieval (ref)

It also supports passing in parameters to Knowledge Base creation to configure retrieval. Example:

params = {
    'search_kwargs': {
        'k': 10
    }
}

Comment on lines +28 to +31
class LLMConfig(BaseModel):
model_name: str = Field(default=DEFAULT_LLM_MODEL, description='LLM model to use for context generation')
provider: str = Field(default=DEFAULT_LLM_MODEL_PROVIDER, description='LLM model provider to use for context generation')
params: Dict[str, Any] = Field(default={}, description='Additional parameters to pass in when initializing the LLM')

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙏 Nice

@tmichaeldb tmichaeldb merged commit 5c6ddfb into main Nov 22, 2024
5 checks passed
@mindsdb mindsdb locked and limited conversation to collaborators Nov 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants