arXiv Retriever
allows users to query the arXiv database for academic articles. It supports both full-document retrieval (PDF parsing) and summary-based retrieval.
For detailed documentation of all ArxivRetriever features and configurations, head to the API reference
Features
- Query Flexibility: Search using natural language queries or specific arXiv IDs.
- Full-Document Retrieval: Option to fetch and parse PDFs.
- Summaries as Documents: Retrieve summaries for faster results.
- Customizable Options: Configure maximum results and output format.
Integration details
Retriever | Source | Package |
---|---|---|
ArxivRetriever | Academic articles from arXiv | @langchain/community |
Setup
Ensure the following dependencies are installed:pdf-parse
for parsing PDFsfast-xml-parser
for parsing XML responses from the arXiv API
Instantiation
Usage
Use theinvoke
method to search arXiv for relevant articles. You can use either natural language queries or specific arXiv IDs.
Use within a chain
Like other retrievers,ArxivRetriever
can be incorporated into LLM applications via chains. Below is an example of using the retriever within a chain: