LangChain Data Validator Tool
A LangChain tool that validates data, checks facts, and detects logical errors using an external AI agent. Perfect for hallucination prevention in LLM applications.
Features
- ✅ Fact-checking across multiple domains
- ✅ Logical error detection
- ✅ Misinformation identification
- ✅ $0.10 per request (premium reasoning layer)
- ✅ Async and sync support
- ✅ Easy integration with LangChain agents
Installation
pip install langchain-data-validator
## Quick Start
from langchain.agents import AgentExecutor, create_tool_calling_agent
from langchain_openai import ChatOpenAI
from langchain import hub
from langchain_data_validator import DataValidatorTool
# Create tool
validator_tool = DataValidatorTool()
# Setup agent
tools = [validator_tool]
llm = ChatOpenAI(model="gpt-3.5-turbo")
prompt = hub.pull("hwchase17/openai-tools-agent")
agent = create_tool_calling_agent(llm, tools, prompt)
agent_executor = AgentExecutor(agent=agent, tools=tools, verbose=True)
# Use it
result = agent_executor.invoke({
"input": "Check if 'Bitcoin price is $100,000' is correct"
})
print(result)
## Direct Usage
from langchain_data_validator import DataValidatorTool
tool = DataValidatorTool()
result = tool.run("Water boils at 50°C")
print(result) # "Result: WRONG: Water boils at 100°C at sea level. (Cost: $0.10)"
Metadata
Release files for langchain-data-validator 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 | Actions |
|---|---|---|---|---|
| langchain_data_validator-0.1.0.tar.gz | 4.4 kB | Without provenance | Details for langchain_data_validator-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| langchain_data_validator-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for langchain_data_validator-0.1.0-py3-none-any.whl |
Total release size: 7.6 kB
Release files / langchain_data_validator-0.1.0.tar.gz
| Download URL | langchain_data_validator-0.1.0.tar.gz |
|---|---|
| Size | 4.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b6d1530ab7bc87a26484730dafa4032d210e688c6abe93ad567ad11f49b80b57
|
|
BLAKE2b-256 checksum How to use checksums |
f4a50aab866292eb43f0a4639e5daf0a30bc1c9c302bfa8fcde7d8758de7278d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.10
|
Release files / langchain_data_validator-0.1.0-py3-none-any.whl
| Download URL | langchain_data_validator-0.1.0-py3-none-any.whl |
|---|---|
| Size | 3.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bff90a490720098cd64b9b97e734ae445d32c2fd9e8750b09ec76b78ed7e1a7b
|
|
BLAKE2b-256 checksum How to use checksums |
5ac760c3b3cb8f1a8695d41903ca2cecc8aa497808699e820f4382cb5887f347
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.10
|
Security for langchain-data-validator 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.