KnowledgeBaseAI is a modern, AI-powered research assistant designed to help students, professionals, and businesses extract insights from complex documents in seconds.
Using Prompt Engineering and Generative AI, it allows users to upload PDFs, research papers, and articles β then ask natural language questions and receive direct answers with citations.


-
π Upload Functionality
Drag-and-drop PDFs, DOCs, or articles for instant analysis. -
π¬ AI-Powered Q&A
Ask questions in a chat-like interface and receive direct answers with page numbers & citations. -
π Multi-Document Search
Upload multiple documents at once; answers reference the exact source. -
π Citation Highlighting
Highlighted text snippets show exactly where answers came from. -
π Export Options
Download AI-generated summaries or Q&A sessions as PDF. -
π¨ Clean & Minimal UI
Built with a soft indigo-and-white palette, neumorphic input fields, and smooth micro-interactions. -
π Use Cases
- Students preparing for exams
- Enterprises searching internal policy docs
- Journalists fact-checking long reports
KnowledgeBaseAI uses prompt chaining and context layering to achieve high-accuracy answers:
-
User Prompt Example:
βSummarize employee leave policies and provide key benefits.β -
AI Process Flow:
- Identify relevant sections across all uploaded PDFs.
- Extract exact sentences for credibility.
- Generate a clean summary with references.
- Return citations (e.g., Page 32 of Policy.pdf).
This ensures answers are contextual, verifiable, and reliable, avoiding βhallucinations.β
Generative AI elevates KnowledgeBaseAI with:
- Context-Aware Summarization: Converts lengthy docs into short, digestible insights.
- Reference-Linked Q&A: Answers grounded in actual document content, not assumptions.
- Knowledge Graphing (future roadmap): AI-generated maps of entities, policies, or ideas to visualize relationships.
- Continuous Learning: Improves with repeated document uploads & query feedback.
from openai import OpenAI
client = OpenAI()
user_query = "Summarize the leave benefits for employees in the uploaded policy document."
prompt = f"""
You are an AI-powered research assistant.
1. Search the uploaded PDF for content related to: "{user_query}".
2. Extract relevant text and provide a summary in 3β4 bullet points.
3. Include page numbers and citations for credibility.
4. Ensure the tone is concise, professional, and clear.
"""
response = client.chat.completions.create(
model="gpt-4",
messages=[{"role": "user", "content": prompt}],
temperature=0.2
)
print("AI Generated Answer:", response.choices[0].message["content"])
This project is not licensed for reuse or redistribution.
All rights reserved Β© [Esha Sharma], 2025.
Please do not copy, modify, or use this work without prior written permission.
Created by [Esha Sharma]
π Prompt Engineer | βοΈ Content Strategist | π€ GenAI Creator