A research assistant for iPhone and Mac
I built a research assistant with a SwiftUI iPhone interface and a Mac tool environment running Ollama. I integrated OCR, speech transcription, image generation and SQLite memory, then built a research workflow that plans searches, retains source material and checks the final answer against the evidence it collected.
The iPhone app includes a Live Activity and selectable context sizes. I added a context-compression helper to fit planning instructions into smaller inference windows. Tool integrations include Tesseract for reading text from images, whisper-cli for transcription and Draw Things for image generation.
Planning and source tracking
I separated the initial plan, follow-up searches and evidence review into distinct stages. The follow-up planner produces structured JSON describing what is missing, which searches to run and when to stop. I validate those proposed searches before execution and log accepted and rejected actions with their reasons. That gives me a way to investigate a weak answer by tracing the decisions that produced it.
The planner receives source counts, extracted facts, coverage gaps and recent queries. I retain that information for the final-answer checks, along with the material gathered during research. Debug output records the accepted follow-ups, rejected actions and reasons for stopping.
Checking and revising answers
I added a bounded rewrite process. The final-answer code allows at most two rewrites, each using the evidence already collected. Additional searches are disabled during those passes. The code then compares the original and revised answers using quality diagnostics. I can examine the rewrite decision separately from the research that preceded it.
I built validators for several answer formats, including event lists, comparisons and timelines. Those checks, the retained sources and the planner logs give me concrete places to investigate when a result is incomplete or a generated claim needs stronger support.