File size: 525 Bytes
198bd6d | 1 2 3 4 5 6 7 8 | 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?"))
|