Skip to content

promptedbyesha/KnowledgeBaseAI-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 

Repository files navigation

πŸ“š KnowledgeBaseAI

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.


πŸ” Preview

image image

✨ Features

  • πŸ“‚ 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

🧠 Prompt Engineering

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:

    1. Identify relevant sections across all uploaded PDFs.
    2. Extract exact sentences for credibility.
    3. Generate a clean summary with references.
    4. Return citations (e.g., Page 32 of Policy.pdf).

This ensures answers are contextual, verifiable, and reliable, avoiding β€œhallucinations.”


πŸ€– Generative AI

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.

πŸ’» Example Code

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"])

πŸ”— Live Demo

πŸ‘‰ Try KnowledgeBaseAI Now



πŸ“„ License

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.


πŸ‘€ Author

Created by [Esha Sharma]
πŸ” Prompt Engineer | ✍️ Content Strategist | πŸ€– GenAI Creator