Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A smal modular RAG framework for C++ πŸ‰ (WIP)

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

CogitatorTech/serpent

Serpent Logo

Serpent

Tests Code Quality Docs License

A modular RAG framework for C++


Serpent is a small C++ framework for building RAG (retrieval-augmented generation) pipelines and AI-powered applications.

Features

  • Modular Design: Swap components via clean interfaces
  • Hybrid Search: hnswlib (dense) + BM25 (sparse) + RRF fusion
  • Dual LLM Support: Local models (llama.cpp) + Cloud APIs (OpenRouter)
  • Document Loaders: PDF, DOCX, and plain text

Architecture

graph TB
 subgraph Loaders["Document Loaders"]
 TXT["TextLoader"]
 PDF["PdfLoader"]
 DOCX["DocxLoader"]
 end
 subgraph Chunking["Text Chunking"]
 RC["RecursiveChunker"]
 end
 subgraph Core["Core"]
 DS["MemoryDocumentStore"]
 SQL["SqliteStore"]
 end
 subgraph Retrieval["Retrieval"]
 HNSW["HNSWStore<br/>(Dense Vectors)"]
 BM25["BM25Index<br/>(Sparse)"]
 HR["HybridRetriever"]
 RRF["RRF Fusion"]
 end
 subgraph Providers["LLM Providers"]
 LLAMA["LlamaCppProvider<br/>(Local)"]
 OR["OpenRouterProvider<br/>(Cloud)"]
 end
 subgraph Utils["Utilities"]
 MM["ModelManager"]
 end
 TXT & PDF & DOCX --> RC
 RC --> DS
 DS --> SQL
 DS --> HNSW & BM25
 HNSW & BM25 --> HR
 HR --> RRF
 RRF --> LLAMA & OR
 MM --> LLAMA
Loading

Quickstart

To be added.


Documentation

To be added.


Contributing

See CONTRIBUTING.md for details on how to make a contribution.

License

Serpent is available under either of the following licenses:

Acknowledgements

  • The logo is from here with some modifications.

About

A smal modular RAG framework for C++ πŸ‰ (WIP)

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Code of conduct

Contributing

Stars

Watchers

Forks

Sponsor this project

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /