RAG Configuration
Fine-tune how AI retrieves and uses your organizational knowledge
Retrieval Augmented Generation (RAG) is the core technology that allows AI agents to leverage your organization’s knowledge & database. Prisme.ai provides two powerful approaches to customize RAG behavior: YAML-based tools and webhooks. These methods give you granular control over every aspect of the RAG pipeline.
Configuration Approaches
For basic configurations, you can use the built-in UI settings:
- Text Splitter Configuration
- Chunk Size
- Chunk Overlap
- Enable override by document
- Embeddings Settings
- Number of chunks to retrieve
- Self-Query
- Enable LLM query reformulation
- Configure from AI Store input
- Query Enhancement
- Select model
- Add instructions and definitions
- Post-Processing
- Show suggested questions
- Filter displayed sources
For basic configurations, you can use the built-in UI settings:
- Text Splitter Configuration
- Chunk Size
- Chunk Overlap
- Enable override by document
- Embeddings Settings
- Number of chunks to retrieve
- Self-Query
- Enable LLM query reformulation
- Configure from AI Store input
- Query Enhancement
- Select model
- Add instructions and definitions
- Post-Processing
- Show suggested questions
- Filter displayed sources
For advanced customization, create YAML-based tools to override specific parts of the RAG pipeline:
YAML tools give you complete control with the full power of AI Builder.
For external processing or integration with existing systems, configure webhooks to intercept and modify RAG behavior:
Webhooks provide maximum flexibility and integration capabilities.
RAG Pipeline Components
The RAG pipeline in Prisme.ai consists of several stages, each of which can be customized using YAML tools or webhooks:
Query Processing
Transform and enhance the user’s question before retrieval
Retrieval
Find relevant documents in your knowledge base
Context Assembly
Organize retrieved documents into a coherent context
Prompt Generation
Create the prompt that will be sent to the LLM
Response Generation
Generate the final answer using the LLM
Post-Processing
Enhance the response with additional information or formatting
YAML Tool Examples
Webhook Integration
Webhooks provide an alternative approach to customizing the RAG pipeline by intercepting key events and modifying the behavior via external HTTP endpoints.
Combining YAML Tools and Webhooks
For the most sophisticated RAG configurations, you can combine YAML tools and webhooks:
Sequential Pipeline
Chain multiple YAML tools to create a sequential processing pipeline, with webhooks for external integration at key points.
Example: YAML tool for query reformulation → webhook for sensitive query detection → YAML tool for retrieval customization
Fallback Mechanisms
Configure webhooks as fallbacks when YAML tools don’t produce satisfactory results.
Example: Try native retrieval first, but if no good matches are found, call webhook to query external knowledge bases
A/B Testing
Use different YAML tools or webhooks based on query characteristics or for experimentation.
Example: Route technical questions through one pipeline and customer support questions through another
Hybrid Processing
Let webhooks handle some RAG components while YAML tools handle others.
Example: Webhook handles retrieval from proprietary databases, YAML tool handles context optimization
Best Practices
Next Steps
Was this page helpful?