Bayesian_LangGraph / examples /quickstart.py
Angshul's picture
Upload 21 files
198bd6d verified
Raw History Blame Contribute Delete
525 Bytes
from bayesian_langgraph import BayesianIndex, BayesianRAGGraph, DocumentRecord
docs = [
DocumentRecord("official", "The current HR portal is PeopleHub.", "Current policy", "official", {"reliability_alpha":18,"reliability_beta":2,"authority":0.98,"freshness":1.0}),
DocumentRecord("legacy", "The HR portal is WorkSphere.", "Legacy guide", "cache", {"reliability_alpha":6,"reliability_beta":6,"authority":0.45,"freshness":0.18}),
]
print(BayesianRAGGraph(BayesianIndex(docs)).invoke("What is the current HR portal?"))