Skip to main content
Use Cases
  • Grounding responses in proprietary documents without fine-tuning.
  • Internal Q&A bots over company handbooks, policies, or codebases.
  • Adding domain-specific knowledge to a general model without prompt stuffing.
  • Reducing hallucinations by giving the model access to authoritative sources at query time.

Prerequisite

Knowledge Bases are made to provide relevant and specific information for an LLM to use. To get started, see Creating a Knowledge Base, Knowledge Bases need to be enriched with the sources documents and configured to expose chunks fitting the use case.
The name of the Knowledge Base will be used as knowledge_id in the model generation.
The knowledge_bases field is available on the Chat Completions endpoint (/v3/router/chat/completions) only, via the orq extension object. It is not supported on the Responses API (/v3/router/responses).

Quick Start

Using the created Knowledge Base, and its id, include the knowledge_bases payload within the model generation call.
The knowledge_bases payload contains query configuration and search type, to learn more, see Search Modes and Chunking Strategy.
curl -X POST https://api.orq.ai/v3/router/chat/completions \
  -H "Authorization: Bearer $ORQ_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "openai/gpt-4o",
    "messages": [{"role": "user", "content": "How can I upgrade my account?"}],
    "orq": {
      "knowledge_bases": [
        {
          "knowledge_id": "api-documentation",
          "top_k": 5,
          "threshold": 0.7,
          "search_type": "hybrid_search"
        }
      ]
    }
  }'
Orq will automatically enrich the model generation with the given context and query to the knowledge base