from src.rag import answer if __name__ == "__main__": print("=== RAG CLI ===") print("Gõ 'quit' để thoát\n") while True: question = input("Câu hỏi: ").strip() if question.lower() in ("quit", "exit", "q"): break if not question: continue result = answer(question) print(f"\nTrả lời: {result['answer']}") print("\nNguồn:") for s in result["sources"]: print(f" - {s['source']} (trang {s['page']}, rrf: {s['rrf_score']}, rerank: {s['rerank_score']})") print()