{"id":17449513,"url":"https://github.com/jplane/openai-gameplan-qna","last_synced_at":"2025-03-28T04:23:36.211Z","repository":{"id":236662622,"uuid":"628086048","full_name":"jplane/openai-gameplan-qna","owner":"jplane","description":null,"archived":false,"fork":false,"pushed_at":"2023-04-14T22:07:19.000Z","size":9,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-02T05:25:35.639Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jplane.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-04-14T22:05:18.000Z","updated_at":"2023-12-09T04:57:13.000Z","dependencies_parsed_at":null,"dependency_job_id":"26ae9d96-0f61-4436-bc9c-ca79d7a25a4e","html_url":"https://github.com/jplane/openai-gameplan-qna","commit_stats":null,"previous_names":["jplane/openai-gameplan-qna"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jplane%2Fopenai-gameplan-qna","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jplane%2Fopenai-gameplan-qna/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jplane%2Fopenai-gameplan-qna/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jplane%2Fopenai-gameplan-qna/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jplane","download_url":"https://codeload.github.com/jplane/openai-gameplan-qna/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245967895,"owners_count":20701915,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-17T21:41:59.821Z","updated_at":"2025-03-28T04:23:36.188Z","avatar_url":"https://github.com/jplane.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OpenAI on Azure - ISE Gameplan QnA\n\nThis repo demonstrates how to interrogate custom data (ISE gameplan documents) using OpenAI LLMs.\n\n## Prerequisites\n\n- [VS Code](https://code.visualstudio.com/download) and the [Remote Development Pack](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.vscode-remote-extensionpack)\n\n- [Docker Desktop](https://www.docker.com/products/docker-desktop/) (for devcontainer support)\n\n- A Microsoft Azure account and subscription (signup for free [here](https://azure.microsoft.com/en-us/free/))\n\n- Access to OpenAI on Azure (currently requires additional [signup](https://learn.microsoft.com/en-us/azure/cognitive-services/openai/overview#how-do-i-get-access-to-azure-openai))\n\n## Instructions\n\n1. Clone this repo to a local folder. Open the folder (as a devcontainer) in VS Code.\n\n1. Once you have access to OpenAI on Azure, [create a new OpenAI resource](https://learn.microsoft.com/en-us/azure/cognitive-services/openai/how-to/create-resource?pivots=web-portal#create-a-resource).\n\n1. [Deploy](https://learn.microsoft.com/en-us/azure/cognitive-services/openai/how-to/create-resource?pivots=web-portal#deploy-a-model) a 'text-davinci-003' model to your OpenAI resource.\n\n1. [Deploy](https://learn.microsoft.com/en-us/azure/cognitive-services/openai/how-to/create-resource?pivots=web-portal#deploy-a-model) a 'text-embedding-ada-002' (v2) model to your OpenAI resource.\n\n1. Copy [template.env](./template.env) into a new file called '.env'. Update the API_BASE and API_KEY values using those [found in the Azure portal](https://learn.microsoft.com/en-us/azure/cognitive-services/openai/chatgpt-quickstart?tabs=command-line\u0026pivots=programming-language-python#retrieve-key-and-endpoint) 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.\n\n1. Copy one or more gameplan DOCX files into the [data](./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](https://aka.ms/gameplantemplate).\n\n1. Run the notebooks cells in [main.ipynb](./main.ipynb) in order to invoke your deployed LLM in Azure. Output of the last cells should show examples of gameplan prompts and answers.\n\n## Ideas for Next Steps\n\n1. Try adjusting the temperature of your model, to see how results change\n\n1. Incorporate multiple documents into the QnA functionality\n\n1. [Parse tables](https://sanyammulay.gitbooks.io/microsoft-office-parsing-doc-sheet-presentation/content/chapter1.html) in the gameplan doc to include more information\n\n1. Store vectorized results in a [vector database](https://www.pinecone.io/lp/vector-database)\n\n1. Try other document types (CPR, etc.)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjplane%2Fopenai-gameplan-qna","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjplane%2Fopenai-gameplan-qna","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjplane%2Fopenai-gameplan-qna/lists"}