Skip to main content

No project description provided

Project description

Evo Researcher

Overview

This project is aimed to be an iteration on top of Autonolas AI Mechs's research process aimed towards making informed predictions.

It contains two primary features:

  • An information research function
  • An information grading function

Additionally, Mech's predict capability has been ported into a function that can also be independently run from this repo.

Below, there's a high level explanation of their implementations, respectively.

Research Function

The research function takes a question, like "Will Twitter implement a new misinformation policy before the 2024 elections?" and will then:

  1. Generate n web search queries
  2. Re-rank the queries using an LLM call, and then select the most relevant ones
  3. Search the web for each query, using Tavily
  4. Scrape and sanitize the content of each result's website
  5. Use Langchain's RecursiveCharacterTextSplitter to split the content of all pages into chunks.
  6. Create embeddings of all chunks, and store the source of each as metadata
  7. Iterate over the queries selected on step 2. And for each one of them, vector search for the most relevant embeddings for each.
  8. Aggregate the chunks from the previous steps and prepare a report.

Grading Function

For the implmentation of this function, the information quality criteria were selected from https://guides.lib.unc.edu/evaluating-info/evaluate, ignoring usability and intended audience.

Upon receiving a question like "Will Twitter implement a new misinformation policy before the 2024 elections?" and information, it will:

  1. Create en evaluation plan
  2. Perform the evaluation of the information according to the plan from the previous step
  3. Extract the scores from the evaluation

Predict

Ported implementation from: https://github.com/valory-xyz/mech/blob/main/tools/prediction_request_embedding/prediction_sentence_embedding.py

Installation

poetry install
poetry shell

Run

Research

With Evo:

poetry run python ./evo_researcher/main.py research "Will Twitter implement a new misinformation policy before the 2024 elections?" evo

With Autonolas:

poetry run python ./evo_researcher/main.py research "Will Twitter implement a new misinformation policy before the 2024 elections?" autonolas

Predict

poetry run python ./evo_researcher/main.py predict "Will Twitter implement a new misinformation policy before the 2024 elections?" ./outputs/myinfopath

Evaluate

poetry run python ./evo_researcher/main.py evaluate "Will Twitter implement a new misinformation policy before the 2024 elections?" ./outputs/myinfopath

Test

Run all questions

pytest

Run specific questions

Use pytest's -k flag and a string matcher. Example:

pytest -k "Twitter"

Example results

Ideas for future improvement

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

evo_researcher-0.1.6.tar.gz (23.2 kB view details)

Uploaded Source

Built Distribution

evo_researcher-0.1.6-py3-none-any.whl (26.8 kB view details)

Uploaded Python 3

File details

Details for the file evo_researcher-0.1.6.tar.gz.

File metadata

  • Download URL: evo_researcher-0.1.6.tar.gz
  • Upload date:
  • Size: 23.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.10.12 Linux/6.5.0-14-generic

File hashes

Hashes for evo_researcher-0.1.6.tar.gz
Algorithm Hash digest
SHA256 1d51c5a7dcf757f60f29e067bd569b2b91cf5060a6c043711d85b41e2ed8b886
MD5 1139278f7d5e77b72b44ed7648d0829d
BLAKE2b-256 fa303ec260124a3daf14d38a4ec5fb15b48f251f96ae7ad989d4d662f42e2c03

See more details on using hashes here.

File details

Details for the file evo_researcher-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: evo_researcher-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 26.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.10.12 Linux/6.5.0-14-generic

File hashes

Hashes for evo_researcher-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 1e03f6ca7b353b7161cbce798eebe3d81b65cbe491c167f665693f2a900f6b80
MD5 638e8592f8eec61bccb2eb89debb2253
BLAKE2b-256 bcfb07331a733eb9c9f3a8398554fc36505e7eee6f05b283c8a1f5ab8c4f7a7c

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