Document Search Assistant is an AI-powered application that allows users to upload PDF documents and ask natural language questions about their content. It helps quickly and accurately find information within large and complex documents by automatically identifying relevant parts and providing clear answers.
Users upload PDF documents to the system. The system logically segments and analyzes the document. Users then ask questions in natural language. The system finds the most relevant parts of the document and the AI model generates the clearest and most direct answers. This makes searching for information in large documents fast and easy.
- The user uploads a PDF file to the system.
- The system splits the PDF into logical chunks and converts each chunk into numerical vectors.
- The user sends a question in natural language to the system.
- The system also converts the question into a numerical vector.
- The question vector is compared with document chunk vectors to find the most relevant parts.
- The selected document chunks and the question are sent to the AI model.
- The AI model generates the clearest and most direct answer based on the information from the document.
- This answer is returned to the user.
POST http://localhost:9090/document/extract
Parameters:
file: PDF file to upload (form-data)
Response:
- Returns a unique UUID string for the uploaded document if successful.
Example:
"ed3c0659-6ee3-4eb2-819d-f57595293d20"POST http://localhost:9090/document/findSimilar
Request Body (JSON):
{
"query": "What actions can the user perform and what are the endpoints for these actions?",
"docId": "ed3c0659-6ee3-4eb2-819d-f57595293d20"
}Description:
You send a natural language question and the document’s UUID. The system finds the most relevant part of the document and generates a clear answer using the AI model.
Response:
Returns a string containing a clear and direct answer based on the document content.
Example Response:
The user can perform the following actions: upload files, make queries, and view results. Endpoints are /document/extract and /document/findSimilar.
Before running the backend of the project, you need to manually add your API keys to the src/main/resources/application.properties file as shown below:
application.properties:
jina.api.key=Bearer YOUR_JINA_API_KEY
gemini.api.key=YOUR_GEMINI_API_KEYcd backend
./gradlew build
./gradlew bootRuncd frontend
npm install
npm run serveThis project is licensed under the MIT License.
Feel free to reach out if you have any questions or suggestions.