Skip to main content

LlamaIndex tools for Swiss Truth — certified knowledge base for AI agents

Project description

LlamaIndex Tools: Swiss Truth

Swiss Truth ToolSpec for LlamaIndex — certified knowledge base for AI agents.

Stop your LlamaIndex agents from hallucinating. Ground every response in 3,000+ certified facts across 38 domains in 10 languages.

Installation

pip install llama-index-tools-swiss-truth

Usage

from llama_index.tools.swiss_truth import SwissTruthToolSpec
from llama_index.core.agent import ReActAgent
from llama_index.llms.openai import OpenAI

spec = SwissTruthToolSpec()
tools = spec.to_tool_list()

agent = ReActAgent.from_tools(tools, llm=OpenAI(model="gpt-4o"), verbose=True)
response = agent.chat("Is health insurance mandatory in Switzerland?")
print(response)

Available Tools

Tool Description
search Search the certified knowledge base for verified facts
verify Verify a factual claim (supported/contradicted/unknown)
submit Submit a new claim for expert review
list_domains List all 38+ available knowledge domains
claim_status Get the verification status of a claim by UUID
batch_verify Verify multiple claims in a single API call
verify_response Fact-check an entire LLM response, get hallucination risk score
find_contradictions Detect contradictions in a block of text
get_compliance Get EU AI Act compliance attestation for a certified claim

No API Key Required

All public endpoints work without authentication. For higher rate limits:

spec = SwissTruthToolSpec(api_key="your-key")

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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

llama_index_tools_swiss_truth-0.1.0-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for llama_index_tools_swiss_truth-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7bfc6883f56132ead0278f78a03a15bc51af01749d45d514856cda2c6e4a4e07
MD5 ab879007d1bd1f38b015441c597e345c
BLAKE2b-256 17e9874bfa0358a2e503a9cabedf5a81805c6be28e9b5fd4281dcc2f89a7e7ee

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