You can also manage your Knowledge Base and documents fully on orq, to do so,
see Creating an Internal Knowledge Base.
Creating an External Knowledge Base
To create an external Knowledge Base, choose the+ button on the desired Project.

Choose `External` when creating your Knowledge Base

Configuration Modal.
| Field | Description | Example |
|---|---|---|
| Key | Unique Identifier, alphanumeric with hyphens/underscore | external_kb |
| Description | Description | External Knowledge Base |
| Name | Display Name | External Knowledge Base Name |
| API URL | URL to search knowledge base, must be HTTPS | https://api.example.org/search |
| API Key | Authentication API key to the previously API URL. Orq will use Bearer Authentication Header to call your API. | <API_KEY> |
orq.ai will include the API Key in the
Authorization: Bearer <API_KEY> header when calling your endpoint.API keys are encrypted using workspace-specific keys (AES-256-GCM)
API Payloads
Here are example payloads for request and response expected from your API.Request Payload
Request Payload
Response Payload
Response Payload
The API must respond like a standard Knowledge Base search, to learn more
about the expected payload, see our Search
API.
Example Implementation for an External API
We’ve created example implementation for External Knowledge Base API.Python Implementation
An Example Python Server for External Knowledge Base
Python Implementation
An Example Python Server for External Knowledge Base
Get the Code
Clone the Python example Server
Install Dependencies
Run the Server
Test the API
The API is running at
http://localhost:8000Dynamic Documentation will be running at http://localhost:8000/docs Node.js Implementation
An Example Node Server for External Knowledge Base
Node.js Implementation
An Example Node Server for External Knowledge Base
Get the Code
Clone the Node example Server
Install Dependencies
Run the Server
Test the API
The API is running at
http://localhost:8000Dynamic Documentation will be running at http://localhost:8000/doc Integrating Vector Database Providers
We support providers like Weaviate and Pinecone, as both platforms expose REST APIs that conform to the expected payload format documented above. Integration ExamplesCommon Errors and Troubleshooting
| Scenario | Error Message |
|---|---|
| HTTP instead of HTTPS | ”External knowledge base URL must use HTTPS protocol” |
| Local/private IP | ”External knowledge base URL cannot point to local network” |
| API unreachable | ”Failed to verify external knowledge base connectivity” |
| API timeout (>50s) | “External API request timed out” |
- Verify your API endpoint is publicly accessible via HTTPS
- Check your API logs for incoming requests from orq.ai IP addresses
- Verify your firewall/security groups allow inbound HTTPS traffic
- Verify the API key is correct and has not expired
- Check that your API expects Bearer authentication in the
Authorizationheader - Confirm your API key has the necessary permissions to perform searches
- Verify your API returns the expected response format (see Response Payload above)
- Check that
scores.search_scorevalues are between 0 and 1 - Test with different
thresholdvalues (lower threshold = more results) - If using reranking, ensure both
search_scoreandrerank_scoreare provided - Verify your external vector database has sufficient indexed documents
- Monitor your external API response times
- Consider implementing caching for frequently searched queries
- Optimize your vector database indexes
- Check if your external API is rate limiting requests
Configuring your External Knowledge Base
Datasource configuration is not accessible within External Knowledge base, as
data is hosted outside of Orq.ai.
- Agentic RAG, to handle knowledge base search refinement with an agent, through orq.ai’s system.
- Search retrieval parameters, Chunk Limit, Search Threshold
- Reranking Models
Your External Knowledge Base is created:
- Use it just like any other Knowledge Base, to learn more see Using a Knowledge Base in a Prompt.
- Your knowledge base can also be used with Agents, see using Knowledge Bases with Agent.
- Your API will be called at runtime when the model needs to perform a search.