Docs / ChatGPT Integration

ChatGPT Integration

Connect ChatGPT to your aqoon knowledge base using Custom GPTs. Once set up, ChatGPT can search your documents and answer questions grounded in your organization's knowledge.

This works with ChatGPT Plus, Team, and Enterprise plans.

Step 1: Get an API Key

  1. Go to API Keys and create a new key
  2. Choose Full access (or scope to specific collections)
  3. Copy the key — it starts with aqn_ and won't be shown again

Step 2: Create a Custom GPT

  1. Open ChatGPT
  2. Click your name → My GPTsCreate a GPT
  3. Go to the Configure tab
  4. Set a name, e.g. "Company Knowledge Assistant"
  5. Add instructions:
    You are a knowledge assistant for [Your Company]. When the user asks a question, use the searchKnowledge action to find relevant documents, then answer based on the results. Always cite which document the information came from.

Step 3: Add the aqoon Action

  1. Scroll down to ActionsCreate new action
  2. Set Authentication to API Key, type Bearer
  3. Paste your aqn_ API key
  4. In the Schema box, paste the following OpenAPI schema:
openapi: 3.0.0
info:
  title: aqoon Knowledge Search
  description: Search your organization's knowledge base
  version: "1.0"
servers:
  - url: https://aqoon.ai
paths:
  /api/v1/search/:
    post:
      operationId: searchKnowledge
      summary: Search the knowledge base for relevant documents
      description: Returns document chunks matching the query, ranked by relevance
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                query:
                  type: string
                  description: The search query
                limit:
                  type: integer
                  description: Number of results (1-50)
                  default: 5
              required:
                - query
      responses:
        "200":
          description: Search results
          content:
            application/json:
              schema:
                type: object
                properties:
                  query:
                    type: string
                  count:
                    type: integer
                  results:
                    type: array
                    items:
                      type: object
                      properties:
                        content:
                          type: string
                        title:
                          type: string
                        document_id:
                          type: string
                        score:
                          type: number
  /api/v1/collections/:
    get:
      operationId: listCollections
      summary: List available collections
      description: Returns all collections the API key can access
      responses:
        "200":
          description: Collection list
  1. Click Test to verify the connection works
  2. Click Save (or Publish to share with your team)

Step 4: Use It

Open your Custom GPT and ask a question about your documents:

  • “What is our leave policy?”
  • “Summarize the latest quarterly report”
  • “What does article 12 of the labor code say?”

ChatGPT will search your aqoon knowledge base, retrieve relevant documents, and answer with citations.

Tips

  • Scope your key: For security, create a scoped API key with read-only access to specific collections, rather than using a full-access key.
  • System instructions: Be specific about your organization and what kind of questions the GPT should handle. This helps ChatGPT format better prompts for the search.
  • Share with your team: Publish the Custom GPT to your ChatGPT Team workspace so everyone can use it.
  • Update the server URL: If you're using a self-hosted aqoon instance, change https://aqoon.ai in the schema to your instance URL.