{"id":13585048,"url":"https://github.com/alejandro-ao/langchain-ask-pdf","last_synced_at":"2025-04-12T18:47:11.897Z","repository":{"id":161748697,"uuid":"634511992","full_name":"alejandro-ao/langchain-ask-pdf","owner":"alejandro-ao","description":"An AI-app that allows you to upload a PDF and ask questions about it. It uses OpenAI's LLMs to generate a response.","archived":false,"fork":false,"pushed_at":"2024-05-07T13:18:46.000Z","size":493,"stargazers_count":621,"open_issues_count":20,"forks_count":318,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-04-03T20:13:07.197Z","etag":null,"topics":["langchain","langchain-python","llms","openai"],"latest_commit_sha":null,"homepage":"","language":"Python","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/alejandro-ao.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-30T11:20:52.000Z","updated_at":"2025-04-01T13:02:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"a6f36554-dbd7-442c-9600-01b4d4688e0f","html_url":"https://github.com/alejandro-ao/langchain-ask-pdf","commit_stats":{"total_commits":13,"total_committers":3,"mean_commits":4.333333333333333,"dds":"0.15384615384615385","last_synced_commit":"4f33490d7220496c0ef7b6db36d3bbcbeb957d53"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alejandro-ao%2Flangchain-ask-pdf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alejandro-ao%2Flangchain-ask-pdf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alejandro-ao%2Flangchain-ask-pdf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alejandro-ao%2Flangchain-ask-pdf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alejandro-ao","download_url":"https://codeload.github.com/alejandro-ao/langchain-ask-pdf/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248617770,"owners_count":21134197,"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":["langchain","langchain-python","llms","openai"],"created_at":"2024-08-01T15:04:42.501Z","updated_at":"2025-04-12T18:47:11.874Z","avatar_url":"https://github.com/alejandro-ao.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# Langchain Ask PDF (Tutorial)\n\n\u003eYou may find the step-by-step video tutorial to build this application [on Youtube](https://youtu.be/wUAUdEw5oxM).\n\nThis is a Python application that allows you to load a PDF and ask questions about it using natural language. The application uses a LLM to generate a response about your PDF. The LLM will not answer questions unrelated to the document.\n\n## How it works\n\nThe application reads the PDF and splits the text into smaller chunks that can be then fed into a LLM. It uses OpenAI embeddings to create vector representations of the chunks. The application then finds the chunks that are semantically similar to the question that the user asked and feeds those chunks to the LLM to generate a response.\n\nThe application uses Streamlit to create the GUI and Langchain to deal with the LLM.\n\n\n## Installation\n\nTo install the repository, please clone this repository and install the requirements:\n\n```\npip install -r requirements.txt\n```\n\nYou will also need to add your OpenAI API key to the `.env` file.\n\n## Usage\n\nTo use the application, run the `main.py` file with the streamlit CLI (after having installed streamlit): \n\n```\nstreamlit run app.py\n```\n\n\n## Contributing\n\nThis repository is for educational purposes only and is not intended to receive further contributions. It is supposed to be used as support material for the YouTube tutorial that shows how to build the project.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falejandro-ao%2Flangchain-ask-pdf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falejandro-ao%2Flangchain-ask-pdf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falejandro-ao%2Flangchain-ask-pdf/lists"}