Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

59 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿง  AI Company Brain

An Enterprise GraphRAG Knowledge Platform for Explainable Organizational Intelligence

Python React FastAPI Qdrant Neo4j Gemini Docker GraphRAG


๐Ÿ“– Overview

AI Company Brain is an enterprise-grade GraphRAG (Graph Retrieval-Augmented Generation) knowledge platform designed to transform fragmented organizational information into an intelligent, explainable, and queryable knowledge system.

Traditional enterprise search systems fail because they treat documents as isolated pieces of information. AI Company Brain goes beyond keyword search by combining:

  • Semantic vector retrieval
  • Knowledge graph reasoning
  • Large language models
  • Source citations
  • Explainable AI workflows

The result is a system capable of answering complex organizational questions while providing transparent reasoning paths and verifiable sources.


๐Ÿšจ The Problem

Modern organizations store information across dozens of disconnected systems:

  • Slack conversations
  • Internal documentation
  • PDFs
  • Incident reports
  • Notion pages
  • GitHub repositories
  • Knowledge bases
  • Engineering runbooks

Existing solutions suffer from several limitations:

Problem Existing Systems
Keyword-based search โŒ
No semantic understanding โŒ
No relationship reasoning โŒ
Hallucinated answers โŒ
No source attribution โŒ
No explainability โŒ

This creates a significant knowledge retrieval bottleneck where employees spend more time searching for information than using it.


๐Ÿ’ก Our Solution

AI Company Brain combines:

Semantic Search
        +
Knowledge Graphs
        +
Graph Traversal
        +
LLM Reasoning
        +
Citation Generation

to create an explainable enterprise intelligence system.

Example query:

"What caused the payment outage?"

Instead of returning documents, the system:

Question
    โ†“
Embedding Generation
    โ†“
Semantic Search
    โ†“
Graph Expansion
    โ†“
Knowledge Retrieval
    โ†“
LLM Reasoning
    โ†“
Source Attribution
    โ†“
Final Answer

Result:

  • Answer
  • Reasoning steps
  • Supporting entities
  • Supporting documents
  • Knowledge graph paths
  • Source citations

๐Ÿ—๏ธ System Architecture

                    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                    โ”‚ React Frontend   โ”‚
                    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                             โ”‚
                             โ–ผ
                    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                    โ”‚ FastAPI Backend  โ”‚
                    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                             โ”‚
         โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
         โ–ผ                   โ–ผ                   โ–ผ

 โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
 โ”‚ Embeddings   โ”‚    โ”‚ Qdrant       โ”‚    โ”‚ Neo4j        โ”‚
 โ”‚ Generation   โ”‚โ”€โ”€โ”€โ–ถโ”‚ Vector DB    โ”‚    โ”‚ Knowledge DB โ”‚
 โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                             โ”‚                   โ”‚
                             โ–ผ                   โ–ผ
                      โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                      โ”‚ Graph Expansion Engine    โ”‚
                      โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                    โ–ผ
                      โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                      โ”‚ Gemini 2.5 Flash          โ”‚
                      โ”‚ Reasoning Engine          โ”‚
                      โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                    โ–ผ
                      โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                      โ”‚ Citation Engine           โ”‚
                      โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿš€ Features

๐Ÿ” Semantic Search

  • Sentence-transformer embeddings
  • Dense vector retrieval
  • Similarity search
  • Context-aware retrieval
  • Semantic ranking

๐Ÿ•ธ๏ธ Knowledge Graph

  • Entity extraction
  • Relationship mapping
  • Multi-hop graph traversal
  • Explainable graph reasoning
  • Interactive graph visualization

๐Ÿง  GraphRAG

  • Semantic retrieval
  • Graph expansion
  • Knowledge enrichment
  • Multi-source reasoning
  • Structured context generation

๐Ÿค– LLM Reasoning

  • Gemini 2.5 Flash integration
  • Context-aware synthesis
  • Multi-document reasoning
  • Graph-assisted generation

๐Ÿ“‘ Citation Engine

Every generated answer includes:

  • Source documents
  • Supporting entities
  • Supporting relationships
  • Evidence tracing
  • Provenance mapping

๐Ÿ“Š Enterprise Dashboard

  • Knowledge statistics
  • Database health
  • Retrieval analytics
  • Graph metrics
  • System monitoring

๐ŸŽจ Interactive Frontend

  • Real-time chat
  • Knowledge graph explorer
  • Architecture visualization
  • Source inspection
  • Responsive UI

๐Ÿงฉ Tech Stack

Frontend

Technology Purpose
React User Interface
Vite Build Tool
Tailwind CSS Styling
JavaScript Frontend Logic

Backend

Technology Purpose
Python Core Language
FastAPI API Framework
Pydantic Validation
Uvicorn ASGI Server

AI & ML

Technology Purpose
Sentence Transformers Embeddings
all-MiniLM-L6-v2 Embedding Model
Gemini 2.5 Flash LLM Reasoning
GraphRAG Retrieval Architecture

Databases

Technology Purpose
Qdrant Vector Database
Neo4j Graph Database

Infrastructure

Technology Purpose
Docker Containerization
Docker Desktop Local Runtime
WSL2 Linux Compatibility

โญ What Makes This Different?

Traditional RAG

Question
    โ†“
Vector Search
    โ†“
LLM
    โ†“
Answer

Problems:

  • Limited context
  • Weak reasoning
  • Hallucinations
  • No relationships
  • Poor explainability

AI Company Brain

Question
     โ†“
Embedding Search
     โ†“
Vector Retrieval
     โ†“
Knowledge Graph
     โ†“
Graph Expansion
     โ†“
LLM Reasoning
     โ†“
Citation Engine
     โ†“
Explainable Answer

Advantages:

โœ… Semantic understanding

โœ… Relationship reasoning

โœ… Multi-hop retrieval

โœ… Explainable outputs

โœ… Source citations

โœ… Knowledge graph exploration


๐Ÿ“ท Demo Screenshots

Login

Login


Dashboard

Dashboard


AI Assistant

Chat


Knowledge Graph

Knowledge Graph


๐Ÿ“‚ Project Structure

CodeSmiths/

โ”œโ”€โ”€ src/                     # React frontend
โ”œโ”€โ”€ backend/
โ”‚   โ”œโ”€โ”€ app/
โ”‚   โ”œโ”€โ”€ embeddings/
โ”‚   โ”œโ”€โ”€ retrieval/
โ”‚   โ”œโ”€โ”€ graph/
โ”‚   โ”œโ”€โ”€ rag/
โ”‚   โ”œโ”€โ”€ citations/
โ”‚   โ”œโ”€โ”€ evaluation/
โ”‚   โ””โ”€โ”€ brain/
โ”‚
โ”œโ”€โ”€ data/
โ”œโ”€โ”€ agent_orchestration/
โ”‚
โ”œโ”€โ”€ test_embeddings.py
โ”œโ”€โ”€ test_qdrant.py
โ”œโ”€โ”€ test_neo4j.py
โ”œโ”€โ”€ test_graph_expansion.py
โ”œโ”€โ”€ test_graph_rag.py
โ””โ”€โ”€ test_citations.py

โš™๏ธ System Requirements

Minimum:

  • Windows 10/11
  • Linux
  • macOS
  • 8 GB RAM
  • 15 GB free storage

Recommended:

  • 16 GB RAM
  • Quad-core CPU
  • SSD
  • Docker Desktop

๐Ÿ› ๏ธ Prerequisites

Install:

  • Python 3.12+
  • Node.js 20+
  • npm
  • Git
  • Docker Desktop
  • WSL2 (Windows)

๐Ÿณ Start Databases

Qdrant

docker run -d \
--name qdrant \
-p 6333:6333 \
-p 6334:6334 \
qdrant/qdrant

Neo4j

docker run -d \
--name neo4j \
-p 7474:7474 \
-p 7687:7687 \
-e NEO4J_AUTH=neo4j/password123 \
neo4j

๐Ÿ“ฅ Installation

Clone repository:

git clone https://github.com/YOUR_USERNAME/CodeSmiths.git

cd CodeSmiths

Backend Setup

pip install -r requirements.txt

or

pip install \
fastapi \
uvicorn \
sentence-transformers \
qdrant-client \
neo4j \
google-generativeai

Create:

.env

Add:

GEMINI_API_KEY=YOUR_GEMINI_API_KEY

Frontend Setup

npm install

๐Ÿš€ Running the Project

Start Backend

python demo_server.py

Backend:

http://localhost:8000

API Docs:

http://localhost:8000/docs

Start Frontend

npm run dev

Frontend:

http://localhost:5173

๐Ÿงช Testing

Run individual subsystem tests:

python test_qdrant.py
python test_neo4j.py
python test_graph_expansion.py
python test_graph_rag.py
python test_citations.py

๐Ÿ“ˆ Example Query

Input:

What caused the payment outage?

Output:

Answer:
The payment outage was caused by the Redis Cluster outage.

Sources:
[1] payment_incident.md
[2] redis_outage.md
[3] slack_thread.md

Graph Entities:
โ€ข Payment Service
โ€ข Incident #1001
โ€ข Slack Thread
โ€ข Redis Cluster

๐Ÿ”ฎ Future Improvements

  • Multi-user authentication
  • Role-based access control
  • Real document connectors
  • Slack integration
  • Notion integration
  • GitHub integration
  • Hybrid retrieval
  • Agentic workflows
  • Real-time graph updates
  • Fine-tuned retrieval models
  • Observability dashboard
  • Production deployment

๐Ÿ‘ฅ Team

Built by Team CodeSmiths.

Contributors:

  • Backend Ingestion
  • Frontend Dashboard
  • Agent Orchestration
  • AI Company Brain / GraphRAG

๐Ÿ“œ License

This project is intended for educational, research, and demonstration purposes.


"From fragmented information to organizational intelligence."

About

An enterprise-grade GraphRAG knowledge platform combining semantic retrieval, knowledge graphs, and LLM reasoning to deliver explainable, citation-backed answers.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages