Skip to content

Commit 0826548

Browse files
docs: Complete models.md with missing field descriptions [AI-assisted] (#214)
Add comprehensive documentation for previously undocumented model fields: - QueryInput: acronym_expanded_from, extracted_acronym_mappings - AssessmentResult: acronym_expanded_from, acronym_expansion_used - BackendResult: execution_time_ms, evidence_type - BibtexEntry: is_retracted, retraction_info - BibtexAssessmentResult: retracted_articles_count, articles_checked_for_retraction Documentation now explains the conceptual purpose and usage context for each field, addressing the incomplete API reference that was misleading developers. Closes #204 Co-authored-by: florath-ai-assistant[bot] <Andreas.Florath@telekom.de>
1 parent 1b2fc1a commit 0826548

File tree

1 file changed

+51
-11
lines changed

1 file changed

+51
-11
lines changed

docs/api-reference/models.md

Lines changed: 51 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,27 +12,50 @@ All models are defined in `src/aletheia_probe/models.py` using Pydantic for vali
1212

1313
Normalized query input passed to backends.
1414

15-
**Concept:** Contains normalized journal information extracted from user input, including identifiers (ISSN, DOI), alternative names, and venue type detection.
15+
**Concept:** Contains normalized journal information extracted from user input, including identifiers (ISSN, DOI), alternative names, venue type detection, and acronym expansion tracking.
1616

17-
**Key Fields:** `raw_input`, `normalized_name`, `identifiers` (dict), `aliases` (list), `venue_type`
17+
**Key Fields:**
18+
- `raw_input` - Original user input
19+
- `normalized_name` - Processed journal/conference name
20+
- `identifiers` - Dictionary of ISSN, DOI, etc.
21+
- `aliases` - Alternative names discovered
22+
- `venue_type` - Detected venue classification
23+
- `acronym_expanded_from` - Original acronym if expansion was applied (e.g., "ICSE" → "International Conference on Software Engineering"). Populated when acronym expansion feature resolves conference abbreviations.
24+
- `extracted_acronym_mappings` - Dictionary of acronym-to-full-name mappings discovered during normalization. Tracks what expansions were found and applied.
1825

1926
## Result Models
2027

2128
### BackendResult
2229

2330
Individual backend query result.
2431

25-
**Concept:** Contains assessment from a single backend, including status (FOUND/NOT_FOUND/ERROR/TIMEOUT/RATE_LIMITED), confidence score (0.0-1.0, validated), assessment type, response timing, and cache indicator.
32+
**Concept:** Contains assessment from a single backend, including status, confidence score, assessment type, response timing, evidence classification, and execution metrics.
2633

27-
**Key Fields:** `backend_name`, `status`, `confidence`, `assessment`, `response_time`, `cached`
34+
**Key Fields:**
35+
- `backend_name` - Name of the backend that produced this result
36+
- `status` - Query result status (FOUND/NOT_FOUND/ERROR/TIMEOUT/RATE_LIMITED)
37+
- `confidence` - Confidence score (0.0-1.0, validated)
38+
- `assessment` - Assessment classification (predatory/legitimate/suspicious/unknown)
39+
- `response_time` - Query response time in seconds
40+
- `cached` - Whether result was retrieved from cache
41+
- `execution_time_ms` - Backend execution time in milliseconds. Measures actual backend processing time separate from network/cache overhead.
42+
- `evidence_type` - Type of evidence used: "predatory_list", "legitimate_list", or "heuristic". Indicates the source and nature of the assessment evidence.
2843

2944
### AssessmentResult
3045

3146
Final aggregated assessment.
3247

33-
**Concept:** Combines all backend results with weighted scoring, reasoning, and metadata.
48+
**Concept:** Combines all backend results with weighted scoring, reasoning, metadata, and acronym expansion tracking.
3449

35-
**Key Fields:** `assessment`, `confidence`, `backend_results` (list), `reasoning` (list), `metadata`, `processing_time`
50+
**Key Fields:**
51+
- `assessment` - Final classification (predatory/legitimate/suspicious/insufficient_data)
52+
- `confidence` - Overall confidence score (0.0-1.0)
53+
- `backend_results` - List of individual backend results
54+
- `reasoning` - Human-readable explanations
55+
- `metadata` - Journal metadata if available
56+
- `processing_time` - Total assessment duration
57+
- `acronym_expanded_from` - Original acronym if assessment used acronym expansion (e.g., "ICSE" → full conference name). Tracks when expansion influenced results.
58+
- `acronym_expansion_used` - Boolean indicating whether acronym expansion was applied. Distinguishes direct name queries from acronym-based queries.
3659

3760
## Metadata Models
3861

@@ -60,17 +83,34 @@ Backend configuration.
6083

6184
Single BibTeX entry representation.
6285

63-
**Concept:** Extracted venue information from BibTeX entries with retraction status tracking.
86+
**Concept:** Extracted venue information from BibTeX entries with comprehensive metadata and retraction status tracking.
6487

65-
**Fields:** `key`, `journal_name`, `entry_type`, `venue_type`, `doi`, `issn`, `is_retracted`, `retraction_info`
88+
**Key Fields:**
89+
- `key` - BibTeX entry key identifier
90+
- `journal_name` - Extracted journal or conference name
91+
- `entry_type` - BibTeX entry type (article, inproceedings, etc.)
92+
- `venue_type` - Detected venue classification (journal/conference/etc.)
93+
- `doi` - Digital Object Identifier if available
94+
- `issn` - International Standard Serial Number if available
95+
- `is_retracted` - Boolean indicating whether the article has been retracted. Determined by checking retraction databases for articles with DOIs.
96+
- `retraction_info` - Dictionary containing retraction details when `is_retracted` is true. Includes retraction reason, date, and source information.
6697

6798
### BibtexAssessmentResult
6899

69100
Aggregated BibTeX file assessment.
70101

71-
**Concept:** Statistics and results from assessing all venues in a BibTeX file, broken down by venue type and assessment category.
72-
73-
**Fields:** Entry counts, assessment counts (predatory/legitimate/suspicious), venue type breakdowns, retraction counts, processing time
102+
**Concept:** Comprehensive statistics and results from assessing all venues in a BibTeX file, with detailed breakdowns by venue type, assessment category, and retraction analysis.
103+
104+
**Key Fields:**
105+
- `total_entries` - Total number of entries processed
106+
- `entries_with_journals` - Number of entries with identifiable venues
107+
- `assessment_results` - List of (entry, assessment) pairs for detailed results
108+
- `predatory_count` / `legitimate_count` / `suspicious_count` - Assessment category counts
109+
- `conference_entries` / `journal_entries` - Venue type breakdowns with specific counters
110+
- `venue_type_counts` - Dictionary mapping venue types to counts
111+
- `retracted_articles_count` - Number of retracted articles discovered. Populated by checking articles with DOIs against retraction databases.
112+
- `articles_checked_for_retraction` - Number of articles that were checked for retraction status. Indicates how many articles had DOIs available for retraction checking.
113+
- `processing_time` - Total assessment duration in seconds
74114

75115
## Enumerations
76116

0 commit comments

Comments
 (0)