init: llm-wiki-haness 하네스 설계
This commit is contained in:
@@ -0,0 +1,60 @@
|
||||
"""원본 5 SCHEMA 의 Pydantic v2 포팅. LLM-facing 필드는 원본 JSON 키(camelCase) 유지."""
|
||||
from typing import Literal, Optional
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
|
||||
class Angle(BaseModel):
|
||||
label: str
|
||||
query: str
|
||||
rationale: Optional[str] = None
|
||||
|
||||
|
||||
class Scope(BaseModel):
|
||||
question: str
|
||||
summary: str
|
||||
angles: list[Angle] = Field(min_length=3, max_length=6)
|
||||
|
||||
|
||||
class SearchResult(BaseModel):
|
||||
url: str
|
||||
title: str
|
||||
snippet: Optional[str] = None
|
||||
relevance: Literal["high", "medium", "low"]
|
||||
|
||||
|
||||
class Search(BaseModel):
|
||||
results: list[SearchResult] = Field(max_length=6)
|
||||
|
||||
|
||||
class Claim(BaseModel):
|
||||
claim: str
|
||||
quote: str
|
||||
importance: Literal["central", "supporting", "tangential"]
|
||||
|
||||
|
||||
class Extract(BaseModel):
|
||||
sourceQuality: Literal["primary", "secondary", "blog", "forum", "unreliable"]
|
||||
publishDate: Optional[str] = None
|
||||
claims: list[Claim] = Field(max_length=5)
|
||||
|
||||
|
||||
class Verdict(BaseModel):
|
||||
refuted: bool
|
||||
evidence: str
|
||||
confidence: Literal["high", "medium", "low"]
|
||||
counterSource: Optional[str] = None
|
||||
|
||||
|
||||
class Finding(BaseModel):
|
||||
claim: str
|
||||
confidence: Literal["high", "medium", "low"]
|
||||
sources: list[str]
|
||||
evidence: str
|
||||
vote: Optional[str] = None
|
||||
|
||||
|
||||
class Report(BaseModel):
|
||||
summary: str
|
||||
findings: list[Finding]
|
||||
caveats: str
|
||||
openQuestions: Optional[list[str]] = None
|
||||
Reference in New Issue
Block a user