Data models¶
The objects a judge reads: one Report per system response, one Request per topic, and Document entries for cited or retrieved text. Because tracks differ in how they attach citations, the sentence types below normalize through Report.get_sentences_with_citations().
Report¶
autojudge_base.report.Report
pydantic-model
¶
Bases: BaseModel
Fields:
-
is_ragtime(bool) -
metadata(ReportMetaData) -
evaldata(Optional[Dict[str, Any]]) -
responses(Optional[List[NeuclirReportSentence] | List[RagtimeReportSentence] | List[Rag24ReportSentence]]) -
answer(Optional[List[NeuclirReportSentence] | List[RagtimeReportSentence] | List[Rag24ReportSentence]]) -
path(Optional[Path]) -
references(Optional[List[str]]) -
ranking(Optional[List[RetrievedDocuments] | List[RankedDocument]]) -
documents(Optional[Dict[str, Document]])
responses
pydantic-field
¶
responses: Optional[List[NeuclirReportSentence] | List[RagtimeReportSentence] | List[Rag24ReportSentence]] = None
answer
pydantic-field
¶
answer: Optional[List[NeuclirReportSentence] | List[RagtimeReportSentence] | List[Rag24ReportSentence]] = None
model_post_init ¶
model_post_init(__context__: dict | None = None) -> None
Source code in src/autojudge_base/report.py
140 141 142 143 144 145 146 147 148 149 150 151 | |
get_report_text ¶
get_report_text()
Source code in src/autojudge_base/report.py
154 155 | |
get_text ¶
get_text() -> str
Source code in src/autojudge_base/report.py
157 158 | |
get_paragraphs ¶
Split report text into paragraphs on double-newlines.
Source code in src/autojudge_base/report.py
160 161 162 163 164 165 | |
get_sentences ¶
Source code in src/autojudge_base/report.py
167 168 | |
get_sentences_with_citations ¶
get_sentences_with_citations() -> List[NeuclirReportSentence]
Get all sentences with citations in unified format.
Returns NeuclirReportSentence objects where citations is List[str] ordered by priority. Does not modify the underlying report data.
Handles all sentence formats: - NeuclirReportSentence: returned as-is - RagtimeReportSentence: citations sorted by confidence (descending) - Rag24ReportSentence: indices resolved to doc_ids via report.references
Source code in src/autojudge_base/report.py
170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 | |
autofill_references ¶
autofill_references()
Source code in src/autojudge_base/report.py
197 198 199 200 201 202 203 204 205 206 | |
switch_responses_to_answer ¶
switch_responses_to_answer()
Source code in src/autojudge_base/report.py
208 209 210 | |
switch_to_neuclir_responses ¶
switch_to_neuclir_responses()
Convert all sentence formats to NeuclirReportSentence.
After calling this method, all sentences in report.responses will be NeuclirReportSentence with citations as List[str] ordered by priority.
Handles: - RagtimeReportSentence: sorts citations by confidence (descending) - Rag24ReportSentence: resolves indices to doc_ids via report.references - NeuclirReportSentence: passes through unchanged
Source code in src/autojudge_base/report.py
212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 | |
verify_ragtime ¶
Source code in src/autojudge_base/report.py
252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 | |
verify ¶
Verify this report against a TrackSpec (structural-only if spec is None).
Delegates to autojudge_base.track_spec.verify. request is needed only for
tracks whose length limit is stored per-request (RAGTIME).
Source code in src/autojudge_base/report.py
304 305 306 307 308 309 310 311 | |
verify_rag ¶
Verify against a RAG spec (default: the latest RAG track, rag26).
Backwards-compatible convenience wrapper over verify(spec).
Source code in src/autojudge_base/report.py
313 314 315 316 317 318 319 | |
to_rag ¶
to_rag(spec=None) -> Report
Convert to a RAG report (default: RAG 2025 generation). See track_spec.to_rag.
Source code in src/autojudge_base/report.py
321 322 323 324 | |
to_ragtime ¶
to_ragtime(spec=None) -> Report
Convert to a RAGTIME report (default: RAGTIME 2025 repgen). See track_spec.to_ragtime.
Source code in src/autojudge_base/report.py
326 327 328 329 | |
Report metadata and sentences¶
autojudge_base.report.ReportMetaData
pydantic-model
¶
Bases: BaseModel
Report meta data for requested reports
Config:
populate_by_name:True
Fields:
-
team_id(str) -
run_id(str) -
topic_id(str) -
collection_ids(Optional[List[str]]) -
task(Optional[TaskType]) -
description(Optional[str]) -
creator(Dict[str, Any]) -
extra(Dict[str, Any]) -
use_starter_kit(Optional[int]) -
type(Optional[str]) -
request_id(Optional[str]) -
limit(Optional[int]) -
narrative_id(Optional[str | int]) -
narrative(Optional[str]) -
run_desc(Optional[str]) -
evaldata(Optional[Dict[str, Any]])
set_topic_ids ¶
set_topic_ids()
Source code in src/autojudge_base/report.py
52 53 54 | |
set_narrative_text ¶
Source code in src/autojudge_base/report.py
56 57 | |
set_msmarco_collection_id ¶
set_msmarco_collection_id()
Source code in src/autojudge_base/report.py
59 60 | |
model_post_init ¶
model_post_init(__context__: dict | None = None) -> None
Source code in src/autojudge_base/report.py
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 | |
autojudge_base.report.RankedDocument
pydantic-model
¶
autojudge_base.report.RetrievedDocuments
pydantic-model
¶
Request¶
autojudge_base.request.Request
pydantic-model
¶
Bases: BaseModel
Fields:
-
request_id(str) -
collection_ids(Optional[List[str]]) -
background(Optional[str]) -
original_background(Optional[str]) -
problem_statement(Optional[str]) -
limit(Optional[int]) -
word_limit(Optional[int]) -
title(str)
Document¶
autojudge_base.document.document.Document
pydantic-model
¶
Bases: BaseModel
NeuCLIR/RAGtime documents and translations.
Config:
extra:allow
Fields:
-
id(str) -
text(str) -
title(Optional[str]) -
url(Optional[str]) -
metadata(Optional[Dict[str, Any]]) -
created(Optional[str]) -
cc_file(Optional[str]) -
time(Optional[str]) -
lang(Optional[str])
get_text ¶
get_text() -> str
All text of the document. Add title if defined.
Source code in src/autojudge_base/document/document.py
36 37 38 39 40 41 42 43 | |
get_document_text ¶
get_document_text() -> str
Source code in src/autojudge_base/document/document.py
45 46 | |
get_paragraphs ¶
Source code in src/autojudge_base/document/document.py
48 49 | |
get_sentences ¶
Source code in src/autojudge_base/document/document.py
51 52 | |
get_text_chunks ¶
Break full text into chunks up to limit, obeying sentence boundaries.
Source code in src/autojudge_base/document/document.py
54 55 56 57 58 59 60 61 62 63 | |