Skip to content

About

Turn Expertise into Structured Knowledge.

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

ContextForge

Ollama, Llama3 Python Docker Version

is an open-source LLM-powered engine that transforms unstructured domain expertise textbooks, lecture notes, documentation into structured knowledge graphs, dependency-aware learning frameworks, and reusable context packs.

Instead of just summarizing content, ContextForge:

  • Extracts core principles and foundational concepts

  • Identifies prerequisite relationships

  • Builds directed knowledge graphs

  • Generates structured learning paths

  • Outputs standardized, reusable context packs

It helps educators, researchers, and organizations transform scattered knowledge into scalable intellectual infrastructure.

output

System Architecture

  1. Input Layer

    • PDF / DOCX / Lecture Notes
  2. Preprocessing Layer

    • OCR
    • Chunking
    • Cleaning
  3. Knowledge Extraction Layer (LLM)

    • Core principle extraction
    • Concept abstraction
    • Definition normalization
  4. Dependency Mapping Layer

    • Concept graph construction
    • Prerequisite inference
    • DAG validation
  5. Structuring Engine

    • Learning path builder
    • Module clustering
    • Cognitive load balancing
  6. Output Layer

    • JSON context pack
    • Visual dependency graph
    • Structured curriculum PDF

Setup

Install git lfs (Large File Storage) and clone the sentence-transformers repository to access all-MiniLM-L6-v2. Clone it inside .models folder

git lfs install
git clone https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2

Installation

Install Ollama

curl -fsSL https://ollama.com/install.sh | sh

Pull llama3

ollama pull llama3.2

Update system config

sudo nano /etc/systemd/system/ollama.service

Edit or add this text, this will expose your ollama

# under [Service]
Environment="OLLAMA_HOST=0.0.0.0:11434"

Restart ollama

sudo systemctl daemon-reload
sudo systemctl restart ollama

Move or rename .env.example and update

docker compose up -d
docker exec -it context-forge /bin/bash
python3 main.py

Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature/your-feature).
  3. Commit your changes (git commit -m 'Add your feature').
  4. Push to the branch (git push origin feature/your-feature).
  5. Open a Pull Request.

Please ensure your code follows the project's coding standards and includes relevant tests.

Hire Me

If you like this project and need help with development, customization, or integration, feel free to reach out!

I’m available for freelance work, consulting, and collaboration.

Thank you for checking out ContextForge!
Feel free to contribute or open issues.

About

Turn Expertise into Structured Knowledge.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages