GPT Prompt Writing to extract information from thesaurus and provided content

I have a thesaurus of index terms and I would like GPT to give me only the index terms available in that thesaurus.
I’ll pass my content, GPT will read that content and extract index terms that are available in both the content and the thesaurus.

Does the thesaurus have an API? Is there any schema or example of request and output data? A little more information about what you want to achieve will help.

Thesaurus are in the form of rows in sql Table. which should be around 15000. we can create an API or in the form of JSON. But requirement is that terms should be picked from thesaurus and relevant to the content passed by user.

openapi: 3.0.0
info:
  title: Thesaurus API
  version: 1.0.0
paths:
  /thesaurus:
    post:
      summary: Retrieve synonyms and meanings for given terms
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                keyTerms:
                  type: array
                  items:
                    type: string
                  description: An array of related terms
              required:
                - keyTerms
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  synonyms:
                    type: string
                    description: The synonyms of the provided terms.
                  meaning:
                    type: string
                    description: The meaning of the provided terms.
        '400':
          description: Bad request

Or JSON Schema:

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "definitions": {
    "Request": {
      "type": "object",
      "properties": {
        "keyTerms": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "An array of related terms"
        }
      },
      "required": ["keyTerms"]
    },
    "Response200": {
      "type": "object",
      "properties": {
        "synonyms": {
          "type": "string",
          "description": "The synonyms of the provided terms."
        },
        "meaning": {
          "type": "string",
          "description": "The meaning of the provided terms."
        }
      }
    },
    "Response400": {
      "type": "object",
      "properties": {
        "message": {
          "type": "string",
          "description": "Error message"
        }
      }
    }
  }
}

ON the backend you need to use embedding to vectorize 15k words then search keyTerms in the embeddings

let me know if there was any issue