Skip to main content

LangChain retriever backed by Compact Knowledge Graphs (CKG) — deterministic, SHA-256 anchored, MCP-native

Project description

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

Project details


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.1.0.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

langchain_ckg-0.1.0-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file langchain_ckg-0.1.0.tar.gz.

File metadata

  • Download URL: langchain_ckg-0.1.0.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for langchain_ckg-0.1.0.tar.gz
Algorithm Hash digest
SHA256 5e31328634cb075990c479df510d1fe62dd80f8808cf9a895566a20a55f84847
MD5 1639963673c02972255bca74d3219549
BLAKE2b-256 c6ed86b1e72cf1dabda90dd1253db40e035af8c2788c9c1f7c1ea2d0edad09ca

See more details on using hashes here.

File details

Details for the file langchain_ckg-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: langchain_ckg-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for langchain_ckg-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f35333ac44cf5011ca10e95f5f14c60966749a72d1c1bdce7c7736439ab78f0c
MD5 823ca2a3bdd4a85e48263e0ac40d808d
BLAKE2b-256 f0d70739e5727e6263a380b95113c8ec31f13d55d143a6c79bde341e761c1b6b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page