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.3.0.tar.gz
(7.0 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.3.0.tar.gz.
File metadata
- Download URL: langchain_ckg-0.3.0.tar.gz
- Upload date:
- Size: 7.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f204f701545d28e5a25f0a8da32df2e0bf203eae23725f60dc8d9e087b04ed2b
|
|
| MD5 |
3919f2aba68f03bdfecf5c2675806c2d
|
|
| BLAKE2b-256 |
af8de727af3c2b437046d479a555efe1de21a0aff6d4f8355c35173ec9a543d3
|
File details
Details for the file langchain_ckg-0.3.0-py3-none-any.whl.
File metadata
- Download URL: langchain_ckg-0.3.0-py3-none-any.whl
- Upload date:
- Size: 5.8 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 |
72aee56c52b55f78303b0fa0b008975ad3625566860cbcdddc959a6aa65e2594
|
|
| MD5 |
d6594c7eb5c0a1810ded584e0053b1f2
|
|
| BLAKE2b-256 |
7c2210b5ee34894ef8b7b1cbd327dda7b2f0312cc093bd267d1459f8b8dd9b68
|