from app.database import SessionLocal
from app.models.user import User
from app.services import ai_mode_service as am
db=SessionLocal(); user=db.query(User).filter(User.role=="admin").first()
for q in ["how is croup treated at home","why does my patient with milk in the bottle have anemia",
          "when do you image a first febrile seizure","what is the rash of measles like"]:
    print("\n==", q)
    for width in (6, 12):
        am.CANDIDATES_PER_KIND = width
        out = am.retrieve(db, user, q)
        print(f"  width {width}:", [f"{s['kind']}:{s['ref'].split('#')[0]} {s['title'][:44]}" for s in out[:5]])
