{"id":26863785,"url":"https://github.com/vikpires/ds_chatbot_pdf","last_synced_at":"2025-03-31T03:32:47.784Z","repository":{"id":284001537,"uuid":"953232000","full_name":"vikpires/DS_chatbot_pdf","owner":"vikpires","description":"Chatbot to read indexed PDF documents through the Azure AI Foundry Portal.","archived":false,"fork":false,"pushed_at":"2025-03-23T15:21:58.000Z","size":3207,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-31T03:32:40.668Z","etag":null,"topics":["azure","azure-ai-foundry","chatbot","data-science","dio","dio-bootcamp","dp100"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vikpires.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2025-03-22T21:44:00.000Z","updated_at":"2025-03-23T15:22:02.000Z","dependencies_parsed_at":"2025-03-23T16:24:52.251Z","dependency_job_id":"02b8a5f9-a82a-4cc4-91ae-55528473f4f7","html_url":"https://github.com/vikpires/DS_chatbot_pdf","commit_stats":null,"previous_names":["vikpires/ds_chatbot_pdf"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vikpires%2FDS_chatbot_pdf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vikpires%2FDS_chatbot_pdf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vikpires%2FDS_chatbot_pdf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vikpires%2FDS_chatbot_pdf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vikpires","download_url":"https://codeload.github.com/vikpires/DS_chatbot_pdf/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246413363,"owners_count":20773052,"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":["azure","azure-ai-foundry","chatbot","data-science","dio","dio-bootcamp","dp100"],"created_at":"2025-03-31T03:32:47.202Z","updated_at":"2025-03-31T03:32:47.776Z","avatar_url":"https://github.com/vikpires.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Chatbot Based On PDF Documents using Azure AI Foundry\n\n\u003e Challenge created as part of the Microsoft Certification Challenge #3 DP-100 Bootcamp by DIO:\n\n## Scenario\nImagine that you are a Software Engineering Student looking for your graduate thesis on human-machine interaction. It's necessary to revise and correlate a lot of papers and essays. Therefore, the more the document as harder is to extract relevant information and connect ideas between the different texts.\n\nWith this challenge, you decide to use AI to make this process easier by developing an intelligent search system to be able to interpret PDF files, organize information and generate relevant answers based on the loaded content.\n\n## Goal\n\n✅Load PDF files containing relevant information about the study or project.\n\n✅Implement an embedded search system to index and retrieve information from PDF files.\n\n✅Use AI to generate responses based on the content of the loaded documents.\n\n✅Develop an interactive chatbot to ask questions and receive contextual answers based on the documents.\n\n---\n\n## 1. Setting the environment in Azure AI Foundry\n\n### 1.1. Create a project in Azure AI Foundry portal\n\n- Navigate to [Azure AI Froundry](https://ai.azure.com/).\n\n- Create a project and new hub\n\n- After the resources are created, you will be brought to your project’s Overview page. On the left-hand menu on the screen, select *Models + endpoints*.\n\n\u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"./assets/models-and-endpoints.png\" title=\"Models + endpoints option\" width=\"40%\" /\u003e \n\u003c/div\u003e\n\u003cdiv align=\"center\"\u003eModels + endpoints\u003c/div\u003e\n\n### 1.2. Setting models in Azure AI Foundry portal\n\n- In Azure AI Foundry’s Models + endpoints page, select **Deploy Model**. \n\n- Click in *deploy base model*. Choose a model to create a new deployment.\n\n- In this project was used **gpt-4** and **text-embedding-3-large**.\n\n- After the model is confirmed in the *Deploy model* window, keep the default naming and select **Create resource and deploy**\n\n- After the models are created, on the left-hand menu on the screen, select *Playgrounds*.\n\n- In the *Chat playground*, you can use your deployed model when it appears in the Deployment selection menu.\n\n### 1.3. Uploading data\n\n- In the Deployment selection menu select **gpt-4**.\n\n- Scroll down and select the option **Add your data** and then **Add a new data source**.\n\n- In the *Add your data* window, select **Upload files** from the *Data source* drop down menu to upload the files to be used.\n\n\u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"./assets/upload-data.png\" title=\"Add your data window\" width=\"80%\" /\u003e \n\u003c/div\u003e\n\u003cdiv align=\"center\"\u003eAdd your data window\u003c/div\u003e\n\u003cbr /\u003e\n\n- The papers used can be found in the folder \u003ca href= './inputs/essays'\u003eessays\u003c/a\u003e.\n\n- Click **next** and create and select a new *Azure AI Search resource*.\n\n\u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"./assets/azure_ai_search_resource.png\" title=\"Selecting Azure AI Search resource\" width=\"80%\" /\u003e \n\u003c/div\u003e\n\u003cdiv align=\"center\"\u003eSelecting Azure AI Search resource\u003c/div\u003e\n\u003cbr /\u003e\n\n- Keep clicking **next** and select **Create vector index** to vectorize all the uploaded essays.\n\n\u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"./assets/create-vector-index.png\" title=\"Creating vector index\" width=\"80%\" /\u003e \n\u003c/div\u003e\n\u003cdiv align=\"center\"\u003eCreating vector index\u003c/div\u003e\n\n### 1.4. Setting the system message\n\n- To personalize the chatbot, in the *Setup* will be given model instructions and context in the system message. The following example text has been used:\n\n```\nYou are a software engineer with extensive knowledge of human-machine interaction. Answer in an objective manner, citing the author and date.\n```\n\n### 1.5. Exploring the chatbot\n\n**Prompt**\n```\nWhat's the definition of human-machine interaction?\n```\n\n**Output**\n```\nAccording to Carroll (1997), human-machine interaction can be broadly defined as the study and practice of designing, implementing, and evaluating interactive computing systems for human use, as well as the study of major phenomena surrounding them. This encompasses the ways in which humans interact with computers and other machines, focusing on the interface design, user experience, and usability.\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvikpires%2Fds_chatbot_pdf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvikpires%2Fds_chatbot_pdf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvikpires%2Fds_chatbot_pdf/lists"}