VarK-3077/KURSE

Python

1

15 commits

updated Dec 19, 2025

See the code

README

KURSE

Neuro-Symbolic Inference Engine

An intelligent data understanding and storage system with ontology-driven reasoning for events and relations.

Built entirely with open source models and infrastructure


Note

The end-to-end pipeline has not yet been fully tested.
Individual components are functional, but complete end-to-end behavior is missing - need to validate and add later


Overview

KURSE is a neuro-symbolic inference engine that combines:

  • Intelligent Tri-Store Architecture: SQL, Vector DB, and Knowledge Graph working together
  • Ontology-Driven Structure: Hierarchical reasoning for events and relations
  • Knowledge Extraction: Transform unstructured documents into structured knowledge

Architecture

┌─────────────────┐     ┌─────────────────┐     ┌─────────────────┐
│    SQL DB       │     │   Vector DB     │     │ Knowledge Graph │
│   (SQLite)      │     │   (Qdrant)      │     │   (Memgraph)    │
└────────┬────────┘     └────────┬────────┘     └────────┬────────┘
         │                       │                       │
         └───────────────────────┼───────────────────────┘
                                │
                    ┌───────────┴───────────┐
                    │   Ingestion Pipeline   │
                    └───────────┬───────────┘
                                │
                    ┌───────────┴───────────┐
                    │    Input Processing    │
                    │      (olmOCR)          │
                    └───────────┬───────────┘
                                │
                         Raw Documents

Key Features

Input Processing

  • Engine: olmOCR (based on Qwen 7B)
  • Output: Structured JSON optimized for LLM readability
  • Performance: ~1.2s per page (with 4090 GPU)
  • Complex Handling: Tables → HTML, Standard Text → Markdown

Vector Database Ingestion

  • Model: CLIP for shared image/text vector space
  • Embeddings: High-fidelity 1024 dimensions
  • Metadata: document_id, chunk_id, page_no, source_file, text_preview

Knowledge Graph Ingestion Pipeline

Identify N-ary → Ambiguity → Initial → Standardization → Ontology → Knowledge
  Relations     Resolution   Assignment                    Check      Graph

Phase 1: N-ary Event Identification

  • LLM identifies complex events with 3+ participants
  • Events stored in manifest with short_id
  • VDB-based deduplication prevents duplicate events

Phase 2: Relation Extraction

  • Triplet extraction with type assignment
  • Ontology standardization via VDB similarity matching
  • Double verification: LLM agent + Ontology tool

N-ary Relations

Relations involving 3+ participants that can't be reduced to binary pairs:

(Person: "Marcus") –[COMMITTED]– (Crime: "Heist_NYC_2024")
                   –[LOCATION]– (Place: "Manhattan")
                   –[WITH]– (Person: "Sofia")
                   –[ON_DATE]– (Date: "2024-03-15")

Node Types

  • Entities: Concrete things (products, persons, organizations)
  • Properties: Descriptive attributes (material, style, designation)
  • Literals: Terminal values (price, date)

Ontology & Reasoning

  • Transitivity: A partOf B, B partOf C → A partOf C
  • Symmetry: A knows B → B knows A
  • Type Inference: Automatic type deduction from relation constraints

Applications

  • Problem: Verify if suspect's alibi is physically possible
  • Approach: Constraint Satisfaction Problem
  • Rule: Entity cannot be at A and B at Time T

2. Market Risk Identification (Hidden Contagion)

  • Problem: Predict supply chain impact on portfolio
  • Approach: Graph Traversal with risk propagation
  • Capability: Find 2nd/3rd order effects

3. E-commerce Search (BeeKurse)

  • Problem: Natural language product discovery
  • Approach: Semantic + structured search
  • Features: Property matching, recommendations, comparisons

Tech Stack

ComponentTechnology
LanguagePython
FrameworkLangChain
Vector DBQdrant, Chroma
Graph DBMemgraph
LLMNVIDIA NIM APIs
OCRolmOCR (Qwen 7B)

Project Structure

KURSE/
├── pipeline/
│   ├── kg_ingestion/      # Knowledge Graph ingestion
│   │   ├── phase1/        # N-ary event identification
│   │   └── phase2/        # Relation extraction
│   ├── vdb_ingestion/     # Vector DB ingestion
│   └── sql_ingestion/     # SQL ingestion
├── ontology/              # Ontology definitions
├── config/                # Configuration files
└── input_pdfs/            # Sample input documents

Setup & Installation

Prerequisites

  • Python 3.10+
  • Docker (for Qdrant and Memgraph)
  • NVIDIA NIM API access
  • GPU recommended for OCR (olmOCR)

Environment Setup

  1. Clone the repository:
git clone <repo-url>
cd KURSE
  1. Install dependencies:
pip install -r requirements.txt
  1. Start database services:
# Start Qdrant
docker run -p 6333:6333 qdrant/qdrant

# Start Memgraph
docker run -p 7687:7687 memgraph/memgraph
  1. Set up environment variables:
cp .env.example .env
# Edit .env with your NVIDIA NIM API keys
  1. Run ingestion pipeline:
python pipeline/run_ingestion.py --input ./input_pdfs/

Team

  • Abhinav Goyal
  • Bhuvan
  • Himesh
  • Kunjan Manoj
  • Siripuru Abhiram
  • Varshith Kada
  • Vishnu Teja

VarK-3077/KURSE

Python

1

15 commits

updated Dec 19, 2025

See the code

README

KURSE

Neuro-Symbolic Inference Engine

An intelligent data understanding and storage system with ontology-driven reasoning for events and relations.

Built entirely with open source models and infrastructure


Note

The end-to-end pipeline has not yet been fully tested.
Individual components are functional, but complete end-to-end behavior is missing - need to validate and add later


Overview

KURSE is a neuro-symbolic inference engine that combines:

  • Intelligent Tri-Store Architecture: SQL, Vector DB, and Knowledge Graph working together
  • Ontology-Driven Structure: Hierarchical reasoning for events and relations
  • Knowledge Extraction: Transform unstructured documents into structured knowledge

Architecture

┌─────────────────┐     ┌─────────────────┐     ┌─────────────────┐
│    SQL DB       │     │   Vector DB     │     │ Knowledge Graph │
│   (SQLite)      │     │   (Qdrant)      │     │   (Memgraph)    │
└────────┬────────┘     └────────┬────────┘     └────────┬────────┘
         │                       │                       │
         └───────────────────────┼───────────────────────┘
                                │
                    ┌───────────┴───────────┐
                    │   Ingestion Pipeline   │
                    └───────────┬───────────┘
                                │
                    ┌───────────┴───────────┐
                    │    Input Processing    │
                    │      (olmOCR)          │
                    └───────────┬───────────┘
                                │
                         Raw Documents

Key Features

Input Processing

  • Engine: olmOCR (based on Qwen 7B)
  • Output: Structured JSON optimized for LLM readability
  • Performance: ~1.2s per page (with 4090 GPU)
  • Complex Handling: Tables → HTML, Standard Text → Markdown

Vector Database Ingestion

  • Model: CLIP for shared image/text vector space
  • Embeddings: High-fidelity 1024 dimensions
  • Metadata: document_id, chunk_id, page_no, source_file, text_preview

Knowledge Graph Ingestion Pipeline

Identify N-ary → Ambiguity → Initial → Standardization → Ontology → Knowledge
  Relations     Resolution   Assignment                    Check      Graph

Phase 1: N-ary Event Identification

  • LLM identifies complex events with 3+ participants
  • Events stored in manifest with short_id
  • VDB-based deduplication prevents duplicate events

Phase 2: Relation Extraction

  • Triplet extraction with type assignment
  • Ontology standardization via VDB similarity matching
  • Double verification: LLM agent + Ontology tool

N-ary Relations

Relations involving 3+ participants that can't be reduced to binary pairs:

(Person: "Marcus") –[COMMITTED]– (Crime: "Heist_NYC_2024")
                   –[LOCATION]– (Place: "Manhattan")
                   –[WITH]– (Person: "Sofia")
                   –[ON_DATE]– (Date: "2024-03-15")

Node Types

  • Entities: Concrete things (products, persons, organizations)
  • Properties: Descriptive attributes (material, style, designation)
  • Literals: Terminal values (price, date)

Ontology & Reasoning

  • Transitivity: A partOf B, B partOf C → A partOf C
  • Symmetry: A knows B → B knows A
  • Type Inference: Automatic type deduction from relation constraints

Applications

  • Problem: Verify if suspect's alibi is physically possible
  • Approach: Constraint Satisfaction Problem
  • Rule: Entity cannot be at A and B at Time T

2. Market Risk Identification (Hidden Contagion)

  • Problem: Predict supply chain impact on portfolio
  • Approach: Graph Traversal with risk propagation
  • Capability: Find 2nd/3rd order effects

3. E-commerce Search (BeeKurse)

  • Problem: Natural language product discovery
  • Approach: Semantic + structured search
  • Features: Property matching, recommendations, comparisons

Tech Stack

ComponentTechnology
LanguagePython
FrameworkLangChain
Vector DBQdrant, Chroma
Graph DBMemgraph
LLMNVIDIA NIM APIs
OCRolmOCR (Qwen 7B)

Project Structure

KURSE/
├── pipeline/
│   ├── kg_ingestion/      # Knowledge Graph ingestion
│   │   ├── phase1/        # N-ary event identification
│   │   └── phase2/        # Relation extraction
│   ├── vdb_ingestion/     # Vector DB ingestion
│   └── sql_ingestion/     # SQL ingestion
├── ontology/              # Ontology definitions
├── config/                # Configuration files
└── input_pdfs/            # Sample input documents

Setup & Installation

Prerequisites

  • Python 3.10+
  • Docker (for Qdrant and Memgraph)
  • NVIDIA NIM API access
  • GPU recommended for OCR (olmOCR)

Environment Setup

  1. Clone the repository:
git clone <repo-url>
cd KURSE
  1. Install dependencies:
pip install -r requirements.txt
  1. Start database services:
# Start Qdrant
docker run -p 6333:6333 qdrant/qdrant

# Start Memgraph
docker run -p 7687:7687 memgraph/memgraph
  1. Set up environment variables:
cp .env.example .env
# Edit .env with your NVIDIA NIM API keys
  1. Run ingestion pipeline:
python pipeline/run_ingestion.py --input ./input_pdfs/

Team

  • Abhinav Goyal
  • Bhuvan
  • Himesh
  • Kunjan Manoj
  • Siripuru Abhiram
  • Varshith Kada
  • Vishnu Teja