Skip to main content

No project description provided

Project description

Prediction Prophet


Discord | Website | :star: the repo !


Welcome!

Prediction Prophet is an agent that specializes in making informed predictions, based on web research. To try it yourself head to predictionprophet.ai or build and run from source following these setup instructions.

Need Help?

Join our Discord community for support and discussions.

Join us on Discord

If you have questions or encounter issues, please don't hesitate to create a new issue to get support.

How It Works

To elaborate further, given a question like "Will Twitter implement a new misinformation policy before the 2024 elections?", Prophet will:

  1. Generate n web search queries and re-ranks them using an LLM call, selecting only the most relevant ones
  2. Search the web for each query, using Tavily
  3. Scrape and sanitize the content of each result's website
  4. Use Langchain's RecursiveCharacterTextSplitter to split the content of all pages into chunks and create embeddings. All chunks are stored with the content as metadata.
  5. Iterate over the queries selected on step 1 and vector search for the most relevant chunks created in step 4.
  6. Aggregate all relevant chunks and prepare a report.
  7. Make a prediction.

Setup

Installation

  1. Clone the repository

    git clone https://github.com/polywrap/predictionprophet

  2. Copy the .env.template file and rename it to .env.

    cp .env.template .env

  3. Find the line that says OPENAI_API_KEY=, and add your unique OpenAI API Key

    OPENAI_API_KEY=sk-...

  4. Find the line that says TAVILY_API_KEY=, and add your unique Tavily API Key

    TAVILY_API_KEY=tvly-...

  5. Install all dependencies

    poetry install

  6. Enter the python environment

    poetry shell

Now you're ready to go!

Predict

poetry run predict "Will Twitter implement a new misinformation policy before the 2024 elections?"

Research

poetry run research "Will Twitter implement a new misinformation policy before the 2024 elections?"

Front-End

poetry run streamlit run ./prediction_prophet/app.py

Possible Future Improvements

For the researcher:

  • Using LLM re-ranking, like Cursor to optimize context-space and reduce noise
  • Use self-consistency and generate several reports and compare them to choose the best, or even merge information
  • Plan research using more complex techniques like tree of thoughts
  • Implement a research loop, where research is performed and then evaluated. If the evaluation scores are under certain threshold, re-iterate to gather missing information or different sources, etc.
  • Perform web searches under different topic or category focuses like Tavily does. For example, some questions benefit more from a "social media focused" research: gathering information from twitter threads, blog articles. Others benefit more from prioritizing scientific papers, institutional statements, and so on.
  • Identify strong claims and perform sub-searches to verify them. This is the basis of AI powered fact-checkers like: https://fullfact.org/
  • Evaluate sources credibility
  • Further iterate over chunking and vector-search strategies
  • Use HyDE

For the information evaluator/grader

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

prediction_prophet-0.1.11.tar.gz (34.7 kB view details)

Uploaded Source

Built Distribution

prediction_prophet-0.1.11-py3-none-any.whl (44.6 kB view details)

Uploaded Python 3

File details

Details for the file prediction_prophet-0.1.11.tar.gz.

File metadata

  • Download URL: prediction_prophet-0.1.11.tar.gz
  • Upload date:
  • Size: 34.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.10.6 Linux/6.5.0-35-generic

File hashes

Hashes for prediction_prophet-0.1.11.tar.gz
Algorithm Hash digest
SHA256 14668133099599ad0aa5b6c436d6a21414693f596256a1d592ef4675a41dae25
MD5 aec2daa2057593909477dd70ffd6160e
BLAKE2b-256 33de9162452b02c03edc90129cff98f5f9acc846ec85a47d49ce68b0a84f329f

See more details on using hashes here.

File details

Details for the file prediction_prophet-0.1.11-py3-none-any.whl.

File metadata

File hashes

Hashes for prediction_prophet-0.1.11-py3-none-any.whl
Algorithm Hash digest
SHA256 4cbc97d27e8748d942c2bca0f04583261db07fe06d2491decdd3a628bcbc9b92
MD5 621b812b9f5dddf3fd4666788544b58a
BLAKE2b-256 3a65ab251ca7c3bc7d4be63518b517e936f02ee545ba45b6124be85c7926320b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page