langchain-ckg
LangChain retriever backed by Compact Knowledge Graphs (CKG) — structured, deterministic, SHA-256 anchored domain knowledge over MCP.
Why
RAG retrieves document chunks. CKG retrieves typed dependency graphs. The difference:
| CKG | RAG | |
|---|---|---|
| Tokens/query | 269 | 2,982 |
| Macro F1 | 0.471 | 0.123 |
| Cost @ $10/1M | $0.003 | $0.030 |
| Provenance | SHA-256 per node | none |
Install
pip install langchain-ckg
Usage
Local retriever (free, bundled graphs)
from langchain_ckg import CKGRetriever
from langchain_openai import ChatOpenAI
from langchain.chains import RetrievalQA
retriever = CKGRetriever(domain="nvidia-nemoclaw", depth=3)
qa = RetrievalQA.from_chain_type(llm=ChatOpenAI(), retriever=retriever)
result = qa.invoke("How does NemoClaw handle CUDA kernel fusion?")
Hosted retriever (rate-gated, upgradeable)
from langchain_ckg import CKGHostedRetriever
# Free: 50 calls/day
retriever = CKGHostedRetriever(domain="nvidia-nemoclaw")
# Unlimited: $10/yr at graphifymd.com/pricing
retriever = CKGHostedRetriever(domain="nvidia-nemoclaw", license_key="your-key")
Available domains
97 domains including NVIDIA AI, NemoClaw, Salesforce AgentForce, Nemotron, and more.
uvx ckg-mcp # then call list_domains
Links
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
langchain_ckg-0.2.0.tar.gz
(4.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file langchain_ckg-0.2.0.tar.gz.
File metadata
- Download URL: langchain_ckg-0.2.0.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a4028267057246506dd5911275ce764740a82730279b93e6f7888300fdad0168
|
|
| MD5 |
a9e4aff6dfac8c88be197ac0c2aabeac
|
|
| BLAKE2b-256 |
18d58616416d4a2c94088fa69283687b0e8b9e04b66c91d2bc10e248bc70fcb2
|
File details
Details for the file langchain_ckg-0.2.0-py3-none-any.whl.
File metadata
- Download URL: langchain_ckg-0.2.0-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8d98e6e4b6d036487f966e3c1744e0fb0e1e6319f3fb04f48aff763ee1da7ef2
|
|
| MD5 |
d90c8d8b9e4a0483d9a346ece86ca620
|
|
| BLAKE2b-256 |
539f469ee1d02e51ae81af6aebaef9feb41c7f60096b81e97197fed183128d08
|