Skip to content
← All solutions

Retrieval-augmented generation

Find the context.
Keep the source.

Build answers from relevant passages, exact matches and source records in one database. Your application decides what reaches the model.

Two ways to find the right passage.

Semantic search finds related meaning. Keyword search preserves names, product codes and exact phrases. Explore how their results become context.

From a question to cited contextInteractive illustration
Your application’s questionHow do I claim a warranty for AX-7?

Your app embeds the question and also sends its search text.

OriginChainDB · two retrieval calls
Vector search

Find similar meaning

  1. policy:12Repair and replacement cover
  2. guide:04Starting a service request
Embedding → related passages
Full-text search · BM25

Find the exact terms

  1. manual:07AX-7 warranty claims
  2. policy:12Repair and replacement cover
Search text → matching passages
Ranked IDs return to your application
Your application

Merge. Verify. Build context.

Combine both lists by rank, remove duplicates and fetch eligible source rows.

Generation stays in your application.
Example context, with source references
  1. [1] AX-7 warranty claimsmanual:07 · page 7
  2. [2] Repair and replacement coverpolicy:12 · page 12

Pass selected passages to your model with their citations.

Illustrative rankings and records. These controls explore the workflow locally.

Prepare the knowledge

One passage.
A shared record ID.

Split documents into useful passages. Store the text, source location and document version; use the same passage ID for retrieval indexes.

Follow the ingestion example
Example passage IDmanual:07
  1. 01

    Save the source row

    Text, document ID, page and version.

  2. 02

    Put its embedding

    Generate the vector with your chosen embedding model.

  3. 03

    Index searchable text

    Add the passage to the full-text index.

These are separate API calls, each atomic on its own. Track completion and retry failed steps before publishing updated content.

Choose the retrieval combination you need.

Text and meaning

Vector search + BM25

Run vector and full-text queries separately. Your application merges the ranked IDs, removes duplicates and loads source rows. Reciprocal Rank Fusion is one way to combine the lists.

Build the retrieval flow
Two embedding representations

Dense + sparse vectors

The vector hybrid endpoint fuses dense and sparse vector rankings on the server. Its sparse inputs are weighted vector components; this route does not query the BM25 text index.

Explore vector hybrid search

Before the answer

Give every passage
a way back.

Keep citations attached as results move through retrieval, reranking and prompt construction. A fluent answer still needs evidence.

Source
Retain the document ID, page or section, and version used for the answer.
Eligibility
Apply access checks before passing source text to the model. Metadata filters help narrow retrieval; they do not replace authorization.
Coverage
Evaluate with known questions and expected sources. When context is insufficient, let the application ask for clarification.

Your workflow.
Your generation model.

OriginChainDB stores and queries the retrieval data. Your application handles chunking, embeddings, result merging, prompts, model calls and answer evaluation.

Where ASK fits

ASK translates natural-language questions into database queries and returns rows. It can serve as a query tool within your application; it does not run a complete RAG generation pipeline.

See the ASK interface