assafelovic/gpt-researcher
Fork: 1980 Star: 14838 (更新于 2024-11-11 10:09:09)
license: Apache-2.0
Language: Python .
LLM based autonomous agent that conducts local and web research on any topic and generates a comprehensive report with citations.
最后发布版本: v3.0.8 ( 2024-09-15 13:22:02)
🔎 GPT Researcher
GPT Researcher is an autonomous agent designed for comprehensive web and local research on any given task.
The agent produces detailed, factual, and unbiased research reports with citations. GPT Researcher provides a full suite of customization options to create tailor made and domain specific research agents. Inspired by the recent Plan-and-Solve and RAG papers, GPT Researcher addresses misinformation, speed, determinism, and reliability by offering stable performance and increased speed through parallelized agent work.
Our mission is to empower individuals and organizations with accurate, unbiased, and factual information through AI.
Why GPT Researcher?
- Objective conclusions for manual research can take weeks, requiring vast resources and time.
- LLMs trained on outdated information can hallucinate, becoming irrelevant for current research tasks.
- Current LLMs have token limitations, insufficient for generating long research reports.
- Limited web sources in existing services lead to misinformation and shallow results.
- Selective web sources can introduce bias into research tasks.
Demo
https://github.com/user-attachments/assets/2cc38f6a-9f66-4644-9e69-a46c40e296d4
Architecture
The core idea is to utilize 'planner' and 'execution' agents. The planner generates research questions, while the execution agents gather relevant information. The publisher then aggregates all findings into a comprehensive report.
Steps:
- Create a task-specific agent based on a research query.
- Generate questions that collectively form an objective opinion on the task.
- Use a crawler agent for gathering information for each question.
- Summarize and source-track each resource.
- Filter and aggregate summaries into a final research report.
Tutorials
Features
- 📝 Generate detailed research reports using web and local documents.
- 🖼️ Smart image scraping and filtering for reports.
- 📜 Generate detailed reports exceeding 2,000 words.
- 🌐 Aggregate over 20 sources for objective conclusions.
- 🖥️ Frontend available in lightweight (HTML/CSS/JS) and production-ready (NextJS + Tailwind) versions.
- 🔍 JavaScript-enabled web scraping.
- 📂 Maintains memory and context throughout research.
- 📄 Export reports to PDF, Word, and other formats.
📖 Documentation
See the Documentation for:
- Installation and setup guides
- Configuration and customization options
- How-To examples
- Full API references
⚙️ Getting Started
Installation
-
Install Python 3.11 or later. Guide.
-
Clone the project and navigate to the directory:
git clone https://github.com/assafelovic/gpt-researcher.git cd gpt-researcher
-
Set up API keys by exporting them or storing them in a
.env
file.export OPENAI_API_KEY={Your OpenAI API Key here} export TAVILY_API_KEY={Your Tavily API Key here}
-
Install dependencies and start the server:
pip install -r requirements.txt python -m uvicorn main:app --reload
Visit http://localhost:8000 to start.
For other setups (e.g., Poetry or virtual environments), check the Getting Started page.
Run as PIP package
pip install gpt-researcher
Example Usage:
...
from gpt_researcher import GPTResearcher
query = "why is Nvidia stock going up?"
researcher = GPTResearcher(query=query, report_type="research_report")
# Conduct research on the given query
research_result = await researcher.conduct_research()
# Write the report
report = await researcher.write_report()
...
For more examples and configurations, please refer to the PIP documentation page.
Run with Docker
Step 1 - Install Docker
Step 2 - Clone the '.env.example' file, add your API Keys to the cloned file and save the file as '.env'
Step 3 - Within the docker-compose file comment out services that you don't want to run with Docker.
docker-compose up --build
If that doesn't work, try running it without the dash:
docker compose up --build
Step 4 - By default, if you haven't uncommented anything in your docker-compose file, this flow will start 2 processes:
- the Python server running on localhost:8000
- the React app running on localhost:3000
Visit localhost:3000 on any browser and enjoy researching!
📄 Research on Local Documents
You can instruct the GPT Researcher to run research tasks based on your local documents. Currently supported file formats are: PDF, plain text, CSV, Excel, Markdown, PowerPoint, and Word documents.
Step 1: Add the env variable DOC_PATH
pointing to the folder where your documents are located.
export DOC_PATH="./my-docs"
Step 2:
- If you're running the frontend app on localhost:8000, simply select "My Documents" from the "Report Source" Dropdown Options.
- If you're running GPT Researcher with the PIP package, pass the
report_source
argument as "local" when you instantiate theGPTResearcher
class code sample here.
👪 Multi-Agent Assistant
As AI evolves from prompt engineering and RAG to multi-agent systems, we're excited to introduce our new multi-agent assistant built with LangGraph.
By using LangGraph, the research process can be significantly improved in depth and quality by leveraging multiple agents with specialized skills. Inspired by the recent STORM paper, this project showcases how a team of AI agents can work together to conduct research on a given topic, from planning to publication.
An average run generates a 5-6 page research report in multiple formats such as PDF, Docx and Markdown.
Check it out here or head over to our documentation for more information.
🖥️ Frontend Applications
GPT-Researcher now features an enhanced frontend to improve the user experience and streamline the research process. The frontend offers:
- An intuitive interface for inputting research queries
- Real-time progress tracking of research tasks
- Interactive display of research findings
- Customizable settings for tailored research experiences
Two deployment options are available:
- A lightweight static frontend served by FastAPI
- A feature-rich NextJS application for advanced functionality
For detailed setup instructions and more information about the frontend features, please visit our documentation page.
🚀 Contributing
We highly welcome contributions! Please check out contributing if you're interested.
Please check out our roadmap page and reach out to us via our Discord community if you're interested in joining our mission.
✉️ Support / Contact us
- Community Discord
- Author Email: assaf.elovic@gmail.com
🛡 Disclaimer
This project, GPT Researcher, is an experimental application and is provided "as-is" without any warranty, express or implied. We are sharing codes for academic purposes under the Apache 2 license. Nothing herein is academic advice, and NOT a recommendation to use in academic or research papers.
Our view on unbiased research claims:
- The main goal of GPT Researcher is to reduce incorrect and biased facts. How? We assume that the more sites we scrape the less chances of incorrect data. By scraping multiple sites per research, and choosing the most frequent information, the chances that they are all wrong is extremely low.
- We do not aim to eliminate biases; we aim to reduce it as much as possible. We are here as a community to figure out the most effective human/llm interactions.
- In research, people also tend towards biases as most have already opinions on the topics they research about. This tool scrapes many opinions and will evenly explain diverse views that a biased person would never have read.
最近版本更新:(数据更新于 2024-09-21 19:29:40)
2024-09-15 13:22:02 v3.0.8
2024-09-08 02:04:47 v3.0.7
2024-08-26 16:05:27 v3.0.6
2024-08-18 14:11:13 v.3.0.5
2024-08-12 20:38:17 v3.0.4
2024-08-04 15:47:28 v3.0.3
2024-07-29 13:42:41 v3.0.2
2024-07-21 15:50:51 v.0.3.1
2024-07-15 18:22:43 v0.3.0
2024-07-06 21:54:54 v0.2.8
主题(topics):
agent, ai, automation, llms, openai, python, research, search, webscraping
assafelovic/gpt-researcher同语言 Python最近更新仓库
2024-11-23 07:15:18 comfyanonymous/ComfyUI
2024-11-23 02:05:08 hect0x7/JMComic-Crawler-Python
2024-11-22 19:26:55 ultralytics/ultralytics
2024-11-22 19:09:02 xtekky/gpt4free
2024-11-22 18:58:34 home-assistant/core
2024-11-22 08:12:43 jxxghp/MoviePilot