Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📌 Project: RAG Assistant for answering questions about the graduate program in Software Engineering with AI

This project implements a RAG (Retrieval-Augmented Generation) assistant designed to answer questions based on course materials from a graduate program in Software Engineering with Applied Artificial Intelligence.

It uses:

Local embeddings via Transformers.js (MiniLM‑L6‑v2) Neo4j as vector‑store Node.js + Express backend React + Vite frontend OpenRouter LLMs

It enables natural‑language queries over PDF files.

📐 Architecture

backend/
  src/
    index.ts   -> PDF ingestion
    ask.ts     -> RAG logic
    server.ts  -> API /api/ask
    files/     -> PDFs
frontend/
  src/App.tsx  -> React UI

⚙️ Environment Variables (.env)

NEO4J_URI=neo4j+s://xxxxx.databases.neo4j.io
NEO4J_USER=neo4j
NEO4J_PASSWORD=your_password

OPENROUTER_API_KEY=your_key
OPENROUTER_MODEL=anthropic/claude-3.5-sonnet:beta
OPENROUTER_SITE_URL=http://localhost:3000
OPENROUTER_SITE_NAME=RAG-System

PDF_FOLDER=./backend/src/files
PORT=3000

🚀 How to Run

1. PDF ingestion

Create the "files" folder in the project root and paste the PDFs there. Then, perform the ingestion:

npx tsx backend/src/index.ts

2. Backend

npx tsx server.ts

3. Frontend

cd frontend
npm install
npm run dev

Open:

http://localhost:5173

🧪 Example

Query: What does the branding manual say about visual identity?

Returns the answer + PDF sources.

📄 LicenseMIT.

About

RAG application to search in PDF files

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages