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

RAG Pipeline Components

The RAG pipeline in Prisme.ai consists of several stages, each of which can be customized using YAML tools or webhooks:

1

Query Processing

Transform and enhance the user’s question before retrieval

2

Retrieval

Find relevant documents in your knowledge base

3

Context Assembly

Organize retrieved documents into a coherent context

4

Prompt Generation

Create the prompt that will be sent to the LLM

5

Response Generation

Generate the final answer using the LLM

6

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