Skip to content

Add websearch#86

Merged
fabnemEPFL merged 35 commits into
EPFLiGHT:masterfrom
laetitia-wilhelm:web_search
Sep 4, 2025
Merged

Add websearch#86
fabnemEPFL merged 35 commits into
EPFLiGHT:masterfrom
laetitia-wilhelm:web_search

Conversation

@laetitia-wilhelm

Copy link
Copy Markdown
Contributor

Websearch on RAG output

Input:
Output file from the RAG model

Output:

  • Original query
  • Summary of the RAG output
  • Brief answer to the query
  • Detailed answer

How to Run

python -m mmore websearch --config-file examples/websearch/config.yaml

Key Parameters

  • n_loops: Number of search loops
  • max_searches: Maximum number of sources retrieved per web search

Pipeline Overview

  1. Load Input Data

    • Extract the original query and the initial answer generated by the RAG model.
  2. Generate Initial Summary

    • Summarize the RAG answer with respect to the original query.
  3. Iterative Search and Analysis (Repeated n_loops times)

    • Generate Search Query:
      Formulate a refined search query by combining the original query, current knowledge, and previous findings (if any).
    • Perform Web Search:
      Retrieve relevant web results using DuckDuckGo.
    • Analyze Search Results:
      Use the language model (LLM) to integrate new web information with existing knowledge, updating the summary accordingly.
    • Update the current knowledge and previous analysis for the next iteration.
  4. Save Final Results

    • Store the final combined summary derived from both web search and RAG output.

@fabnemEPFL fabnemEPFL left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work so far, sounds promising. Some changes needed.
I have to go so there will be a follow-up review later today

Comment thread examples/websearchRAG/config.yaml Outdated
Comment thread src/mmore/run_websearch.py Outdated
Comment thread src/mmore/run_websearch.py Outdated
Comment thread src/mmore/run_websearch.py Outdated
Comment thread src/mmore/websearchRAG/config.py Outdated
Comment thread src/mmore/websearchRAG/config.py Outdated
Comment thread src/mmore/websearchRAG/pipeline.py Outdated
Comment thread src/mmore/websearchRAG/pipeline.py Outdated
Comment thread src/mmore/websearchRAG/pipeline.py Outdated

@fabnemEPFL fabnemEPFL left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additional comments

Comment thread src/mmore/websearchRAG/pipeline.py Outdated
Comment thread src/mmore/websearchRAG/pipeline.py Outdated
Comment thread src/mmore/websearchRAG/pipeline.py Outdated
Comment thread src/mmore/websearchRAG/pipeline.py
Comment thread src/mmore/websearchRAG/pipeline.py Outdated
Comment thread src/mmore/websearchRAG/pipeline.py Outdated
Comment thread src/mmore/websearchRAG/pipeline.py Outdated
Comment thread src/mmore/websearchRAG/websearch.py Outdated
Comment thread src/mmore/websearchRAG/websearch.py Outdated
Comment thread docs/websearch.md Outdated
Comment thread docs/websearch.md Outdated
Comment thread docs/websearch.md
Comment thread docs/websearch.md
Comment thread docs/websearch.md Outdated
Comment thread examples/websearchRAG/config_api.yaml Outdated
Comment thread src/mmore/run_websearch.py Outdated
Comment thread src/mmore/cli.py Outdated

@fabnemEPFL fabnemEPFL left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will make soon the changes related to the few additional comments I added

Comment thread src/mmore/run_websearch.py Outdated
Comment thread src/mmore/websearchRAG/config.py Outdated
n_loops: int = 2
max_searches: int = 10
llm_config: Dict[str, Any] = field(
default_factory=lambda: {"llm_name": "gpt-4", "max_new_tokens": 1200}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make it a field of type LLMConfig

Comment thread src/mmore/run_websearch.py Outdated
@fabnemEPFL fabnemEPFL merged commit 9d0af5c into EPFLiGHT:master Sep 4, 2025
4 checks passed
JCHAVEROT pushed a commit to JCHAVEROT/mmore that referenced this pull request Jun 19, 2026
Co-authored-by: fabnemEPFL <fabrice.nemo@epfl.ch>
Co-authored-by: fabnemEPFL <117652591+fabnemEPFL@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants