public_documentation-retrievers
Retrievers in Evie’s Library are AI-powered search components that extract semantically relevant document chunks from catalogs to provide contextual grounding for Specialist responses. They act as controlled bridges between user queries and stored knowledge, enabling granular access control through catalog-specific configurations.
Retrievers in Evie’s Library are AI-powered search components that extract semantically relevant document chunks from catalogs to provide contextual grounding for Specialist responses. They act as controlled bridges between user queries and stored knowledge, enabling granular access control through catalog-specific configurations.
Core Functionality
Retrievers perform four key operations: interpreting natural-language queries, searching through pre-chunked documents in a designated catalog, scoring chunks by semantic similarity, and surfacing the most relevant context for Evie’s response generation. Without an attached retriever, Specialists cannot access a catalog’s contents, allowing administrators to enforce strict data boundaries by purpose or use case.
Technical Architecture
The system supports two primary retriever types: Standard RAG Retrievers (default) and Dossier Retrievers (specialized). Standard RAG Retrievers operate on all catalog documents, while Dossier Retrievers (forthcoming) will filter by metadata tags. Both inherit a base configuration schema with tunable parameters like es_k (max results, default: 8) and similarity_threshold (default: 0.3), stored as JSON in the retriever’s configuration field.
Configuration Parameters
Critical settings include:
es_k: Limits the number of retrieved chunks (range: 1–20; default 8).similarity_threshold: Filters chunks by cosine similarity score (range: 0.0–1.0; default 0.3). Lower values enforce stricter relevance, while higher values broaden results.tag_conditions(Dossier Retrievers only): Applies metadata-based filtering (e.g.,customer_id:123).
Operational Workflow
When a query is submitted, the retriever:
- Encodes the question into a vector embedding.
- Compares it against catalog chunk embeddings using cosine similarity.
- Returns the top-
es_kchunks exceeding thesimilarity_threshold. - Passes these chunks as context to the Specialist for response synthesis.
Best Practices
Optimize performance by:
- Naming conventions: Use prefixes like
strict_(threshold <0.3) orbroad_(threshold >0.5) to signal configuration. - Threshold tuning: Adjust in 0.05 increments; monitor for precision/recall tradeoffs.
- Multi-retriever setups: Deploy parallel retrievers on the same catalog with divergent thresholds (e.g., one for exploratory queries, another for high-precision needs).
Retrievers also support A/B testing via duplicate configurations with incremental parameter changes, enabling data-driven optimization without disrupting production workflows.