Extend the pipeline with custom components
mainThe Scholar QA pipeline is designed to be modular. You can extend or replace components by implementing the following abstract base classes:
Retrieval Customization
AbstractRetriever: For custom paper retrieval logic.AbstractReranker: For custom reranking logic.AbsPaperFinder: For custom paper finding/aggregation logic.
Generation Customization
MultiStepQAPipeline: Can be extended or modified to change how the multi-step generation (quote extraction, planning, summary) occurs.
Application Customization
To extend the web app functionality, you can use a fastapi.APIRouter to add new endpoints to the existing application. When doing this, ensure you reimplement lazy_load_scholarqa in your new API script to ensure the correct class is initialized.