This repo demonstrates how to interrogate custom data (ISE gameplan documents) using OpenAI LLMs.
-
VS Code and the Remote Development Pack
-
Docker Desktop (for devcontainer support)
-
A Microsoft Azure account and subscription (signup for free here)
-
Access to OpenAI on Azure (currently requires additional signup)
-
Clone this repo to a local folder. Open the folder (as a devcontainer) in VS Code.
-
Once you have access to OpenAI on Azure, create a new OpenAI resource.
-
Deploy a 'text-davinci-003' model to your OpenAI resource.
-
Deploy a 'text-embedding-ada-002' (v2) model to your OpenAI resource.
-
Copy template.env into a new file called '.env'. Update the API_BASE and API_KEY values using those found in the Azure portal for your provisioned OpenAI resource. For API_VERSION use '2023-03-15-preview'. For COMPLETION_DEPLOYMENT_NAME use the name of the 'davinci' model you deployed in the previous step. For EMBEDDINGS_DEPLOYMENT_NAME use the 'text-embedding-ada-002' deployment.
-
Copy one or more gameplan DOCX files into the data folder. These are the custom data sources you'll be querying using your OpenAI model. For this PoC use gameplan docs which adhere to the gameplan template.
-
Run the notebooks cells in main.ipynb in order to invoke your deployed LLM in Azure. Output of the last cells should show examples of gameplan prompts and answers.
-
Try adjusting the temperature of your model, to see how results change
-
Incorporate multiple documents into the QnA functionality
-
Parse tables in the gameplan doc to include more information
-
Store vectorized results in a vector database
-
Try other document types (CPR, etc.)