langchain-deepinquiry
LangChain integration for DeepInquiry: a library of short factual claims, each returned with its sources, a verification tier (gold, silver, bronze), a source-difference score and a signed CiteSig attestation.
Install
pip install langchain-deepinquiry
Get a free API key (500 requests a month, no card) at https://www.deepinquiry.ai/signup and set it:
export DEEPINQUIRY_API_KEY="di_live_..."
Retriever
from langchain_deepinquiry import DeepInquiryRetriever
retriever = DeepInquiryRetriever(k=4)
docs = retriever.invoke("how many hearts does an octopus have")
for d in docs:
print(d.page_content)
print(d.metadata["verification_tier"], d.metadata["source"])
Each Document carries the fact id, the page to cite (source), the verification tier, the score, the
source URLs and the signed attestation (citesig).
Agent tools
from langchain_deepinquiry import DeepInquirySearchTool, DeepInquiryGetFactTool, DeepInquiryRandomFactTool
tools = [DeepInquirySearchTool(), DeepInquiryGetFactTool(), DeepInquiryRandomFactTool()]
Pass them to any LangChain or LangGraph agent. Results come back as plain text with the sources and a link to cite.
Try the API first
There is a live, keyless demo on https://www.deepinquiry.ai/api that shows the exact response.
Terms
The code in this package is MIT licensed. Facts returned by the API have their own terms: the free tier requires attribution to DeepInquiry (the links in each result serve for that) and paid plans allow commercial use. See https://www.deepinquiry.ai/terms and https://www.deepinquiry.ai/data-license.
Published by Machine Accountability Corporation.
Metadata
Release files for langchain-deepinquiry 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| langchain_deepinquiry-0.1.0.tar.gz | 8.7 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| langchain_deepinquiry-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 16.0 kB
Release files / langchain_deepinquiry-0.1.0.tar.gz
| Download URL | langchain_deepinquiry-0.1.0.tar.gz |
|---|---|
| Size | 8.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a2b3ed8aa1a0bd78ae4df12b03270b3067ef8de262ebf94dd521feae27644501
|
|
BLAKE2b-256 checksum How to use checksums |
a7760b44baeaeb852b00f34fb8c473bb2a63d9319bf544a6f325015eb34a0558
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.10
|
Release files / langchain_deepinquiry-0.1.0-py3-none-any.whl
| Download URL | langchain_deepinquiry-0.1.0-py3-none-any.whl |
|---|---|
| Size | 7.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
94abe9f70cceba9560c70fefb6fc9e3b40294741387b268aae1536b4934ec806
|
|
BLAKE2b-256 checksum How to use checksums |
d31f202b02b019e90053d919ba5eb4d0346d1076fa0d75097e19969fae8acf18
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.10
|
Security for langchain-deepinquiry 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.