Using Azure OpenAI to retrieve SQL data

Janarthanan S 700 Reputation points
2023-09-13T13:35:16.8166667+00:00

Is it preferred to provide the full schema (lets say into a .sql file) to GPT model?

or instead give it instructions to search for it directly in the database which is quick to produce better results.

Azure Open Datasets
Azure Open Datasets
An Azure service that provides curated open data for machine learning workflows.
27 questions
Azure OpenAI Service
Azure OpenAI Service
An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
3,254 questions
Azure AI services
Azure AI services
A group of Azure services, SDKs, and APIs designed to make apps more intelligent, engaging, and discoverable.
2,908 questions
0 comments No comments
{count} vote

Accepted answer
  1. ChakaravarthiRangarajanBhargavi-1820 715 Reputation points
    2023-09-13T15:14:47.3233333+00:00

    Hi Janarthanan,

    Great question let me get you though this, the choice between providing a full schema in a .sql file or instructing a GPT model to search directly in a database depends on various factors like security, maintenance, and performance. Providing a .sql file can enhance security and predictability but requires manual maintenance. Direct database access offers real-time data but necessitates robust security measures and may impact performance, depending on the database's complexity. The decision should align with project requirements and consider the trade-offs between convenience and security.

    If you find this answer useful kindly accept it, for assistance ping here thanks.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.