Retrieval Modes
duohub offers three primary retrieval modes when querying your knowledge graph or vector store: Raw, Assisted, and Facts. These can be used to suit your use case.Raw Mode (Default)
Raw mode returns unprocessed matches from your memory store without AI assistance.- When you need direct access to the raw memory chunks
- For implementing custom post-processing logic
- When transparency in the retrieval process is crucial
Assisted Mode
Assisted mode uses AI to process the retrieved information and provide a coherent response. This is our suggested mode for most use cases as it will keep your context window clean.- When you need a natural language response
- For chatbots and user-facing applications
- When you want to synthesize information from multiple sources
Facts Mode
Facts mode provides three supporting facts along with the response. It can be combined with either Raw or Assisted mode.- When you need to provide evidence for the response
- For applications requiring transparency in decision-making
- When building educational tools or fact-checking systems
Mode Combinations
The retrieval modes can be combined to suit your needs:- Raw + Facts: Returns unprocessed chunks with supporting facts
- Assisted + Facts: Returns an AI-processed response with supporting facts (most common)
Note: When bothassisted=True
andraw=True
are specified, the assisted mode takes precedence.
Best Practices
- Start with Raw mode during development to understand the underlying data
- Use Assisted mode for production applications with direct user interaction
- Add Facts mode when source verification or transparency is important
- Consider response time requirements - Raw mode is typically faster than Assisted mode