> ## Documentation Index
> Fetch the complete documentation index at: https://docs.awardee.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Preview knowledge retrieval for a query

> Runs the chatbot's knowledge search for `query` without starting a conversation and returns every candidate: the chunks the model would receive (`selected`, in rank order) and why each other one was dropped (`dropped[].outcome`). Read-only. Limited to 150 requests per minute per organization.



## OpenAPI

````yaml /openapi.json post /chatbots/{id}/retrieval-preview
openapi: 3.1.0
info:
  title: Awardee API
  version: 1.0.0
  description: >-
    Public REST API for managing Awardee resources. All requests authenticate
    with an API key. Keys are scoped to a single organization.
servers:
  - url: https://api.awardee.com/v1
    description: Production
security:
  - api_key: []
paths:
  /chatbots/{id}/retrieval-preview:
    post:
      tags:
        - Chatbots
      summary: Preview knowledge retrieval for a query
      description: >-
        Runs the chatbot's knowledge search for `query` without starting a
        conversation and returns every candidate: the chunks the model would
        receive (`selected`, in rank order) and why each other one was dropped
        (`dropped[].outcome`). Read-only. Limited to 150 requests per minute per
        organization.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                query:
                  type: string
                  minLength: 1
                  maxLength: 2000
                folder_id:
                  anyOf:
                    - type: string
                      format: uuid
                    - type: 'null'
                language:
                  anyOf:
                    - type: string
                      minLength: 2
                      maxLength: 16
                    - type: 'null'
                qr_code_id:
                  anyOf:
                    - type: string
                      format: uuid
                    - type: 'null'
                product_id:
                  anyOf:
                    - type: string
                      format: uuid
                    - type: 'null'
                object_id:
                  anyOf:
                    - type: string
                      format: uuid
                    - type: 'null'
              required:
                - query
              additionalProperties: false
      responses:
        '200':
          description: Retrieval trace
          content:
            application/json:
              schema:
                type: object
                properties:
                  query:
                    type: string
                  folder_id:
                    anyOf:
                      - type: string
                        format: uuid
                      - type: 'null'
                  language:
                    anyOf:
                      - type: string
                      - type: 'null'
                  qr_code_id:
                    anyOf:
                      - type: string
                        format: uuid
                      - type: 'null'
                  product_id:
                    anyOf:
                      - type: string
                        format: uuid
                      - type: 'null'
                  object_id:
                    anyOf:
                      - type: string
                        format: uuid
                      - type: 'null'
                  scan_applied:
                    anyOf:
                      - type: boolean
                      - type: 'null'
                  reranked:
                    type: boolean
                  rerank_provider:
                    anyOf:
                      - type: string
                      - type: 'null'
                  mmr_lambda:
                    type: number
                  counts:
                    type: object
                    properties:
                      vector_hits:
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                      fulltext_hits:
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                      candidates:
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                      selected:
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                    required:
                      - vector_hits
                      - fulltext_hits
                      - candidates
                      - selected
                    additionalProperties: false
                  selected:
                    type: array
                    items:
                      type: object
                      properties:
                        outcome:
                          type: string
                          enum:
                            - selected
                            - below_rerank_cutoff
                            - near_duplicate
                            - diversity
                            - lower_score
                        rank:
                          anyOf:
                            - type: integer
                              minimum: -9007199254740991
                              maximum: 9007199254740991
                            - type: 'null'
                        article_id:
                          type: string
                          format: uuid
                        article_title:
                          type: string
                        article_url:
                          type: string
                        chunk_index:
                          anyOf:
                            - type: integer
                              minimum: -9007199254740991
                              maximum: 9007199254740991
                            - type: 'null'
                        language:
                          anyOf:
                            - type: string
                            - type: 'null'
                        text:
                          type: string
                        fused_score:
                          type: number
                        rerank_score:
                          anyOf:
                            - type: number
                            - type: 'null'
                        duplicate_of:
                          anyOf:
                            - type: object
                              properties:
                                article_id:
                                  type: string
                                  format: uuid
                                chunk_index:
                                  anyOf:
                                    - type: integer
                                      minimum: -9007199254740991
                                      maximum: 9007199254740991
                                    - type: 'null'
                              required:
                                - article_id
                                - chunk_index
                              additionalProperties: false
                            - type: 'null'
                        similarity:
                          anyOf:
                            - type: number
                            - type: 'null'
                        scan_linked:
                          type: boolean
                      required:
                        - outcome
                        - rank
                        - article_id
                        - article_title
                        - article_url
                        - chunk_index
                        - language
                        - text
                        - fused_score
                        - rerank_score
                        - duplicate_of
                        - similarity
                        - scan_linked
                      additionalProperties: false
                  dropped:
                    type: array
                    items:
                      type: object
                      properties:
                        outcome:
                          type: string
                          enum:
                            - selected
                            - below_rerank_cutoff
                            - near_duplicate
                            - diversity
                            - lower_score
                        rank:
                          anyOf:
                            - type: integer
                              minimum: -9007199254740991
                              maximum: 9007199254740991
                            - type: 'null'
                        article_id:
                          type: string
                          format: uuid
                        article_title:
                          type: string
                        article_url:
                          type: string
                        chunk_index:
                          anyOf:
                            - type: integer
                              minimum: -9007199254740991
                              maximum: 9007199254740991
                            - type: 'null'
                        language:
                          anyOf:
                            - type: string
                            - type: 'null'
                        text:
                          type: string
                        fused_score:
                          type: number
                        rerank_score:
                          anyOf:
                            - type: number
                            - type: 'null'
                        duplicate_of:
                          anyOf:
                            - type: object
                              properties:
                                article_id:
                                  type: string
                                  format: uuid
                                chunk_index:
                                  anyOf:
                                    - type: integer
                                      minimum: -9007199254740991
                                      maximum: 9007199254740991
                                    - type: 'null'
                              required:
                                - article_id
                                - chunk_index
                              additionalProperties: false
                            - type: 'null'
                        similarity:
                          anyOf:
                            - type: number
                            - type: 'null'
                        scan_linked:
                          type: boolean
                      required:
                        - outcome
                        - rank
                        - article_id
                        - article_title
                        - article_url
                        - chunk_index
                        - language
                        - text
                        - fused_score
                        - rerank_score
                        - duplicate_of
                        - similarity
                        - scan_linked
                      additionalProperties: false
                  served_context:
                    type: string
                  tool_result:
                    anyOf:
                      - type: string
                      - type: 'null'
                  scan_item_note:
                    anyOf:
                      - type: string
                      - type: 'null'
                required:
                  - query
                  - folder_id
                  - language
                  - qr_code_id
                  - product_id
                  - object_id
                  - scan_applied
                  - reranked
                  - rerank_provider
                  - mmr_lambda
                  - counts
                  - selected
                  - dropped
                  - served_context
                  - tool_result
                  - scan_item_note
                additionalProperties: false
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Machine-readable error code.
                  message:
                    type: string
                  request_id:
                    type: string
                  details: {}
                  retry_after:
                    type: number
                required:
                  - error
                  - message
                additionalProperties: false
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Machine-readable error code.
                  message:
                    type: string
                  request_id:
                    type: string
                  details: {}
                  retry_after:
                    type: number
                required:
                  - error
                  - message
                additionalProperties: false
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Machine-readable error code.
                  message:
                    type: string
                  request_id:
                    type: string
                  details: {}
                  retry_after:
                    type: number
                required:
                  - error
                  - message
                additionalProperties: false
        '404':
          description: Not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Machine-readable error code.
                  message:
                    type: string
                  request_id:
                    type: string
                  details: {}
                  retry_after:
                    type: number
                required:
                  - error
                  - message
                additionalProperties: false
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Machine-readable error code.
                  message:
                    type: string
                  request_id:
                    type: string
                  details: {}
                  retry_after:
                    type: number
                required:
                  - error
                  - message
                additionalProperties: false
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Machine-readable error code.
                  message:
                    type: string
                  request_id:
                    type: string
                  details: {}
                  retry_after:
                    type: number
                required:
                  - error
                  - message
                additionalProperties: false
components:
  securitySchemes:
    api_key:
      type: http
      scheme: bearer
      bearerFormat: aw_live_<hex>
      description: >-
        Send your API key as `Authorization: Bearer aw_live_…`. Manage keys in
        the dashboard under Settings → API Keys.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.