Streamlit UI sample¶
The Streamlit UI is a small sample application, not the core interface of the package. It is included to make the feedback loop visible: search for evidence, mark what helps or does not help, rerank the current list, and optionally expand retrieval with a feedback-refined query.
Install the UI extra¶
Install evidence-fetcher with the optional UI dependencies:
pip install "evidence-fetcher[ui]"
Make sure BRAVE_SEARCH_API_KEY is configured before launching the app.
Launch the app¶
Start the browser-based sample:
evidence-fetcher-ui
Streamlit opens the app in a local browser tab. If the browser does not open
automatically, visit the local URL printed in the terminal, usually
http://localhost:8501.
Review evidence step by step¶
Enter a search query in the sidebar.
The default query is only an example. Replace it with the topic you want to investigate.
Choose a result limit.
Smaller limits are useful for quick review. Larger limits give the local ranker more candidates to reorder.
Click
Search.The app retrieves web evidence with Brave Search, normalizes the results, removes duplicate URLs, and displays the ranked candidates.
Read the result titles, URLs, and snippets.
Each result is a candidate evidence item. The UI does not decide whether a result is correct; it gives you controls to record your judgment.
Mark each useful result.
Use
morefor evidence you want to see more of,lessfor evidence that is somewhat off target,irrelevantfor evidence that should move away from the current ranking direction, andunsurewhen you want to record that you reviewed the item without changing the ranking direction.Click
Rerank results.Reranking reorders the current candidate list using only the evidence already shown and the feedback you marked.
Click
Expand searchwhen the current candidates are not enough.Expansion builds a deterministic refined query from your feedback, performs one additional Brave retrieval, merges new URLs into the session, and reranks the expanded list.
Repeat marking, reranking, and expansion as needed.
The sample is designed to show an explicit Interactive Information Retrieval loop. Searches expand only when you ask for expansion; feedback buttons do not automatically run background retrieval.
How to interpret the controls¶
moreThis result is useful and should pull the ranking toward similar evidence.
lessThis result is related but less useful, so similar evidence should receive less emphasis.
irrelevantThis result is off target and should push the ranking away from similar evidence.
unsureThis records that the item was reviewed, but it does not change the ranking direction.
Rerank resultsReorder the current results with accumulated feedback.
Expand searchFetch additional candidates with a refined query derived from accumulated feedback.