Skip to content

Migration from LangChain

Benmebrouk edited this page Apr 12, 2026 · 1 revision

Migration from LangChain

Add Wauldo Guard on top of your existing LangChain pipeline. No rewrite needed.

Before

answer = qa.invoke("What is the refund policy?")
# Hope it's correct...

After (+5 lines)

from wauldo import HttpClient

guard = HttpClient(base_url="https://api.wauldo.com", api_key="YOUR_KEY")
answer = qa.invoke("What is the refund policy?")

sources = retriever.get_relevant_documents("What is the refund policy?")
source_text = "\n".join([doc.page_content for doc in sources])

check = guard.guard(text=answer, source_context=source_text)
if check.is_safe:
    return answer
else:
    return f"Could not verify: {check.claims[0].reason}"

What changes

LangChain only + Wauldo Guard
Hallucination detection None Numerical, negation, semantic
Trust score None 0.0 to 1.0
Wrong answers Served to user Blocked
Added latency 0ms <1ms (lexical)

Works with LangChain, LlamaIndex, Haystack, CrewAI, or any custom pipeline.

Clone this wiki locally