RAG API
Overview of IntelliAsk's Retrieval-Augmented Generation (RAG) API — the service that indexes uploaded files and retrieves relevant passages for context-aware answers. Points to the full configuration and embeddings reference.
The RAG API powers IntelliAsk's chat-with-files. When a user uploads a document, the RAG API splits it into chunks, embeds those chunks with a configurable embeddings provider, and stores the vectors in a vector database (PostgreSQL + pgvector by default). At query time it embeds the question, retrieves the most relevant chunks, and passes them to the model so the answer is grounded in the user's documents.
It runs as a separate FastAPI + LangChain service (rag-api) alongside the
IntelliAsk app. For the end-user feature, see
Features → RAG API.
RAG is optional and disabled by default
The RAG API needs a working embeddings provider — without one, rag-api
crash-loops on start — so the stack ships it disabled. intelliask provision
asks whether to enable it and points you at the embeddings setup first. Turn it on
once configured with:
and off again with intelliask module disable rag. The app runs fine without it;
RAG features are simply unavailable until it is enabled.
Configuration lives in the service reference
This page is just an overview. All RAG settings are environment variables in
config/.env, read by the container under the same name. The complete,
authoritative reference is under Services → RAG API:
RAG API (service reference)
What it is, how indexing/retrieval works, and how it is wired into the stack.
Configuration
Every non-embeddings variable — server, authentication, vector database (pgvector and MongoDB Atlas), chunking, batching, document processing, and logging.
Embeddings providers
The full provider matrix — OpenAI, Azure, HuggingFace (local + TEI), Ollama, Google GenAI, VertexAI, and AWS Bedrock — with each provider's keys and models.
Deploy → Components → RAG API
How the service is wired into the Compose stack: image tag, resource limits, the shared database keys, and update steps.
Before you enable it
Provisioning already sets up the database credentials the RAG API shares with
the bundled Vector DB. What you must supply
is the embeddings provider: pick one, then fill the matching keys in
config/.env (and, if needed, config/rag.compose.yml) following the
Embeddings providers reference.
At minimum, set:
Don't change the model on a populated store
The embedding dimension is fixed per model (e.g. 1536 for text-embedding-3-small,
384 for all-MiniLM-L6-v2). Changing EMBEDDINGS_MODEL after documents are indexed
makes existing vectors incompatible — keep it stable or plan a full re-index.
Then enable and start the service:
Run intelliask env doctor first to confirm the variables are wired between
config/.env and the compose files.
Last updated on