Document Question Answering models can be used to answer natural language questions about documents. Typically, Document QA models consider textual, layout, and potentially visual information. This is useful when the question requires some understanding of the visual aspects of the document. Nevertheless, certain Document QA models can work without document images. Hence the task is not limited to visually-rich documents and allows users to ask questions based on spreadsheets, text, PDFs, etc.
Source: https://huggingface.co/tasks/document-question-answeringThis project is a web application that allows you to upload a PDF file and ask questions about the content of the document. The application uses the OpenAI API to generate answers to the questions asked about the uploaded document.
The application uses Pinecone to store the document embeddings generated from the uploaded PDF file that is used to give OpenAI the context of the document to generate answers to the questions asked about the document.
Source: https://www.pinecone.io- Next.js v14
- Tailwind CSS v3
- TypeScript v5
Font:
Montserrat (headings), Nunito (body)
Colour Theme:
Source: https://coolors.co/897ceb-e9e8ee-99989f-575151-b2b7f6-d65e57 Diagram made with draw.io Diagram made with draw.ioFirst, run the initial setup:
# new terminal
nvm use # or download the node version in .nvmrc
npm run setup
Verify that an .env.local
file is generated on your project directory. Also verify that node -v
corresponds to the version in .nvmrc
.
Then, run the development server:
npm run dev
Open http://localhost:3000 with your browser to see the web application.
You'll find Sanity Studio on http://localhost:3000/admin.
You can set up nvm
to automatically switch to the correct node version when you cd
into this project directory. This is done by reading the .nvmrc
file in the root of the project with the node version we are using.
Read here on achieving this.
More information on Document QA Systems:
- What is Document Question Answering? - Hugging Face
- What is RAG? - Retrieval-Augmented Generation Explained
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API
- Learn Next.js - an interactive Next.js tutorial