Ibraheem Wagih
All projects

Machine Learning for Business

Self-checking research assistant

A Streamlit app that takes the name of an industry and writes a short market research brief from Wikipedia sources.

  • RAG
  • LLM-as-judge
  • Gemini
  • Streamlit
Context
UCL Machine Learning for Business, individual coursework
Date
February 2026
Team
Individual
Stack
Python, Streamlit, LangChain, Gemini API

How it works

Gemini 2.5 Flash Lite writes the brief from retrieved Wikipedia articles. A second model, Gemini 2.5 Flash at temperature 0, then checks the draft for claims the sources do not support and for the word limit.

Before any retrieval, a separate check rejects inputs that are not industries, so a query like "red" or a string of random letters does not trigger a search.

Testing

I tested the app with deliberately awkward inputs as well as the automated check. That led to changes in the retrieval settings and to a system prompt that tells the model to say when information is not available, rather than filling the gap with numbers.

Beyond the prototype

In the write-up I set out what a production version would need: retrieval over a company's own documents from a vector database, locally hosted models where data privacy matters, and caching for repeated queries.