Answer Engine Overview
Orama’s Answer Engine enables you to create ChatGPT, Perplexity, or SearchGPT-like experiences using Retrieval Augmented Generation (RAG). Combine powerful full-text search with AI-powered chat capabilities to build intelligent conversational interfaces.What is RAG?
Retrieval Augmented Generation (RAG) is a technique that enhances large language models by providing them with relevant context from your data. Instead of relying solely on the model’s training data, RAG:- Searches your database for relevant documents
- Retrieves the most relevant results as context
- Generates responses based on both the query and the retrieved context
Key Features
Streaming Responses
Get real-time, token-by-token responses for a smooth user experience
Source Attribution
Track which documents were used to generate each response
Session Management
Maintain conversation context across multiple interactions
Custom Prompts
Customize system prompts to control AI behavior
Quick Start
Here’s a minimal example to get you started:How It Works
When you callsession.ask(), Orama performs the following steps:
Search Phase
Orama searches your database using the provided query term and returns the most relevant documents.
AI Generation
The query and context are sent to the configured LLM (via Secure Proxy) to generate a response.
Secure Proxy Plugin
The Answer Engine requires the Secure Proxy Plugin to securely communicate with AI providers like OpenAI. This plugin:- Keeps your API keys secure on the server side
- Handles authentication and rate limiting
- Supports multiple AI providers and models
- Is completely free to use
The Secure Proxy Plugin is essential for Answer Engine to work. Make sure to configure it with a valid API key and chat model.
Available Chat Models
When configuring the Secure Proxy Plugin, you can choose from various chat models:openai/gpt-4o- Most capable OpenAI modelopenai/gpt-4o-mini- Fast and cost-effectiveopenai/gpt-4-turbo- Balanced performanceopenai/gpt-3.5-turbo- Budget-friendly option
Next Steps
Configure Sessions
Learn how to customize AnswerSession with system prompts, context, and events
Build Chat UIs
Create interactive chat experiences with streaming responses