Consensus
Reconcile
Reconciles multiple dictionaries to produce a single unified consensus dictionary.
POST
/
v1
/
consensus
/
reconcile
Copy
from uiform import UiForm
client = UiForm()
# Multiple extraction results to reconcile
extractions = [
{
"title": "Quantum Algorithms in Interstellar Navigation",
"authors": ["Dr. Stella Voyager", "Dr. Nova Star", "Dr. Lyra Hunter"],
"year": 2025,
"keywords": ["quantum computing", "space navigation", "algorithms"]
},
{
"title": "Quantum Algorithms for Interstellar Navigation",
"authors": ["Dr. S. Voyager", "Dr. N. Star", "Dr. L. Hunter"],
"year": 2025,
"keywords": ["quantum algorithms", "interstellar navigation", "space travel"]
},
{
"title": "Application of Quantum Algorithms in Space Navigation",
"authors": ["Stella Voyager", "Nova Star", "Lyra Hunter"],
"year": 2025,
"keywords": ["quantum computing", "navigation", "space exploration"]
}
]
# Reconcile the different extraction results into a consensus
response = client.consensus.reconcile(
list_dicts=extractions,
mode="aligned"
)
consensus_result = response.consensus_dict
consensus_confidence = response.consensus_likelihoods
print(f"Consensus: {consensus_result}")
print(f"Confidence scores: {consensus_confidence}")
Copy
{
"consensus_dict": {
"authors": [
"Dr. Stella Voyager",
"Dr. Nova Star",
"Dr. Lyra Hunter"
],
"keywords": [
"quantum computing",
"space navigation",
"algorithms"
],
"title": "Quantum Algorithms in Interstellar Navigation",
"year": 2025
},
"likelihoods": {
"authors": [
0.76667,
0.75,
0.79167
],
"keywords": [
0.66667,
0.33333,
0.33333
],
"title": 0.70897,
"year": 1.0
}
}
Copy
from uiform import UiForm
client = UiForm()
# Multiple extraction results to reconcile
extractions = [
{
"title": "Quantum Algorithms in Interstellar Navigation",
"authors": ["Dr. Stella Voyager", "Dr. Nova Star", "Dr. Lyra Hunter"],
"year": 2025,
"keywords": ["quantum computing", "space navigation", "algorithms"]
},
{
"title": "Quantum Algorithms for Interstellar Navigation",
"authors": ["Dr. S. Voyager", "Dr. N. Star", "Dr. L. Hunter"],
"year": 2025,
"keywords": ["quantum algorithms", "interstellar navigation", "space travel"]
},
{
"title": "Application of Quantum Algorithms in Space Navigation",
"authors": ["Stella Voyager", "Nova Star", "Lyra Hunter"],
"year": 2025,
"keywords": ["quantum computing", "navigation", "space exploration"]
}
]
# Reconcile the different extraction results into a consensus
response = client.consensus.reconcile(
list_dicts=extractions,
mode="aligned"
)
consensus_result = response.consensus_dict
consensus_confidence = response.consensus_likelihoods
print(f"Consensus: {consensus_result}")
print(f"Confidence scores: {consensus_confidence}")
Copy
{
"consensus_dict": {
"authors": [
"Dr. Stella Voyager",
"Dr. Nova Star",
"Dr. Lyra Hunter"
],
"keywords": [
"quantum computing",
"space navigation",
"algorithms"
],
"title": "Quantum Algorithms in Interstellar Navigation",
"year": 2025
},
"likelihoods": {
"authors": [
0.76667,
0.75,
0.79167
],
"keywords": [
0.66667,
0.33333,
0.33333
],
"title": 0.70897,
"year": 1.0
}
}
Authorizations
Body
application/json
Response
200
application/json
Successful Response
The response is of type object
.
Copy
from uiform import UiForm
client = UiForm()
# Multiple extraction results to reconcile
extractions = [
{
"title": "Quantum Algorithms in Interstellar Navigation",
"authors": ["Dr. Stella Voyager", "Dr. Nova Star", "Dr. Lyra Hunter"],
"year": 2025,
"keywords": ["quantum computing", "space navigation", "algorithms"]
},
{
"title": "Quantum Algorithms for Interstellar Navigation",
"authors": ["Dr. S. Voyager", "Dr. N. Star", "Dr. L. Hunter"],
"year": 2025,
"keywords": ["quantum algorithms", "interstellar navigation", "space travel"]
},
{
"title": "Application of Quantum Algorithms in Space Navigation",
"authors": ["Stella Voyager", "Nova Star", "Lyra Hunter"],
"year": 2025,
"keywords": ["quantum computing", "navigation", "space exploration"]
}
]
# Reconcile the different extraction results into a consensus
response = client.consensus.reconcile(
list_dicts=extractions,
mode="aligned"
)
consensus_result = response.consensus_dict
consensus_confidence = response.consensus_likelihoods
print(f"Consensus: {consensus_result}")
print(f"Confidence scores: {consensus_confidence}")
Copy
{
"consensus_dict": {
"authors": [
"Dr. Stella Voyager",
"Dr. Nova Star",
"Dr. Lyra Hunter"
],
"keywords": [
"quantum computing",
"space navigation",
"algorithms"
],
"title": "Quantum Algorithms in Interstellar Navigation",
"year": 2025
},
"likelihoods": {
"authors": [
0.76667,
0.75,
0.79167
],
"keywords": [
0.66667,
0.33333,
0.33333
],
"title": 0.70897,
"year": 1.0
}
}
Assistant
Responses are generated using AI and may contain mistakes.