DocumentLookup#
- class lumen.ai.tools.DocumentLookup(*, sync_sources, enable_query_refinement, max_refinement_iterations, min_refinement_improvement, min_similarity, n, refinement_similarity_threshold, vector_store, always_use, interface, llm, memory, prompts, template_overrides, purpose, name)#
The DocumentLookup tool creates a vector store of all available documents and responds with a list of the most relevant documents given the user query. Always use this for more context.
Parameters#
type: bool
default: True
Whether to enable query refinement for improving search results.
type: int
default: 3
bounds: (1, 10)
Maximum number of refinement iterations to perform.
type: Number
default: 0.05
bounds: (0, 1)
Minimum improvement in similarity score required to keep refining.
type: Number
default: 0.05
bounds: None
The minimum similarity to include a document.
type: int
default: 10
bounds: (1, None)
The number of document results to return.
type: Number
default: 0.3
bounds: (0, 1)
Similarity threshold below which query refinement is triggered.
type: bool
default: True
Whether to automatically sync newly added document sources to the vector store.
type: lumen.ai.vector_store.VectorStore
default: None
Vector store object which is queried to provide additional contextbefore responding.
Methods#
- async DocumentLookup.requirements(messages: list[Message]) list[str] #
- async DocumentLookup.respond(messages: list[Message], **kwargs: Any) str #
Responds to the provided messages.