This commit is contained in:
Yiorgis Gozadinos 2025-12-03 16:13:13 +02:00
parent 0f5b9ae208
commit a57203065a
No known key found for this signature in database
5 changed files with 8 additions and 7 deletions

View file

@ -26,7 +26,7 @@ GUIDELINES:
- Consider both answers correct if they convey the same essential information - Consider both answers correct if they convey the same essential information
- Be tolerant of different levels of detail if the core answer is preserved - Be tolerant of different levels of detail if the core answer is preserved
- Evaluate based on what a person asking this question would need to know - Evaluate based on what a person asking this question would need to know
/no_think""" """
class LLMJudgeResponseSchema(BaseModel): class LLMJudgeResponseSchema(BaseModel):

View file

@ -18,5 +18,4 @@ Guidelines:
- Stick to the answer, do not ellaborate or provide context unless explicitly asked for it. - Stick to the answer, do not ellaborate or provide context unless explicitly asked for it.
Be concise, and always maintain accuracy over completeness. Prefer short, direct answers that are well-supported by the documents. Be concise, and always maintain accuracy over completeness. Prefer short, direct answers that are well-supported by the documents.
/no_think
""" """

View file

@ -29,13 +29,13 @@ class ResearchPlan(BaseModel):
class Citation(BaseModel): class Citation(BaseModel):
"""Resolved citation with full metadata for display/visual grounding.""" """Resolved citation with full metadata for display/visual grounding."""
document_id: str document_id: str = ""
chunk_id: str chunk_id: str = ""
document_uri: str document_uri: str = ""
document_title: str | None = None document_title: str | None = None
page_numbers: list[int] = Field(default_factory=list) page_numbers: list[int] = Field(default_factory=list)
headings: list[str] | None = None headings: list[str] | None = None
content: str content: str = ""
class SearchAnswer(BaseModel): class SearchAnswer(BaseModel):

View file

@ -315,6 +315,8 @@ async def test_ask_with_cite(app: HaikuRAGApp, monkeypatch):
mock_answer = "Test answer with citations" mock_answer = "Test answer with citations"
mock_citations = [ mock_citations = [
Citation( Citation(
document_id="doc-123",
chunk_id="chunk-456",
document_uri="test.md", document_uri="test.md",
document_title="Test Document", document_title="Test Document",
page_numbers=[1], page_numbers=[1],

View file

@ -19,7 +19,7 @@ async def test_qa_ollama(qa_corpus: Dataset, temp_db_path):
"""Test Ollama QA with LLM judge.""" """Test Ollama QA with LLM judge."""
client = HaikuRAG(temp_db_path, create=True) client = HaikuRAG(temp_db_path, create=True)
qa = QuestionAnswerAgent( qa = QuestionAnswerAgent(
client, ModelConfig(provider="ollama", name="gpt-oss", enable_thinking=False) client, ModelConfig(provider="ollama", name="gpt-oss", enable_thinking=True)
) )
llm_judge = LLMJudge() llm_judge = LLMJudge()