- Backend running:
uvicorn Jujutsu-Quants.app.adk.main:app --reload- Send sample request:
curl -s -X POST http://localhost:8000/api/v2/report -H "Content-Type: application/json" -d '{"question":"Test Tesla hypothesis"}' | jq- Expected: response JSON contains
biaslist. Current bug: entities are hardcoded; update detector to accept list via config or request.
- Add config-driven or request-driven entity list.
- Update tests and README with configuration example.
Make BiasDetector usable by removing hardcoded TARGET_ENTITIES and allowing entities from:
- config (
AGENT_CONFIGS['bias_detector']['entities'], optional) - request-time input (method argument)
- fallback to simple title keywords
- Add optional parameter
entities: List[str] | Nonetodetect(articles, entities=None). - If
entitiesis None, read from config; if still empty, derive from titles by picking capitalized tokens. - Keep existing proximity logic unchanged.
- Input:
articles: List[Dict{title:str, content:str}], optionalentities: List[str]. - Output: existing bias result list (unchanged schema).
articles = [{
'title': 'Apple beats expectations',
'content': 'Analysts say Apple showed unprecedented growth.'
}]
det = create_bias_detector()
out = det.detect(articles, entities=['Apple'])
# out[0]['entity_focus'] == 'apple'- Hardcoded list removed; method accepts optional
entities. - If no entities provided, detector derives at least one from titles.
- Existing output shape unchanged; tests pass on simple sample above.
- To derive entities quickly:
re.findall(r"\b[A-Z][a-zA-Z]{2,}\b", title)and lowercase them.
good first issue, agents, bias