<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Omernimer on Medium]]></title>
        <description><![CDATA[Stories by Omernimer on Medium]]></description>
        <link>https://medium.com/@omernimer05?source=rss-ac4f98a95592------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*ogMzIJxhM44P4CFb</url>
            <title>Stories by Omernimer on Medium</title>
            <link>https://medium.com/@omernimer05?source=rss-ac4f98a95592------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 11:36:49 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@omernimer05/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[The Autonomous Football Journalist: An AI That Writes Match Reports and Then Grades Its Own Work]]></title>
            <link>https://medium.com/@omernimer05/the-autonomous-football-journalist-an-ai-that-writes-match-reports-and-then-grades-its-own-work-6dc3a996ed67?source=rss-ac4f98a95592------2</link>
            <guid isPermaLink="false">https://medium.com/p/6dc3a996ed67</guid>
            <category><![CDATA[langgraph]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[prompt-engineering]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[groq-ai]]></category>
            <dc:creator><![CDATA[Omernimer]]></dc:creator>
            <pubDate>Sun, 21 Jun 2026 12:12:48 GMT</pubDate>
            <atom:updated>2026-06-21T12:12:48.900Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Here’s the finished system and the two things that turned it from “a model that writes” into “an agent we actually trust.”</em></p><p>When we started this project the idea was simple: thousands of football match reports get written every day, and they almost all follow the same shape; who scored, when, and what it meant for the table. The facts are public and structured. The only tricky part is turning them into something a human would actually want to read.</p><p>So we asked: can an agent own that entire job? Fetch the data, figure out what context the story needs, and write the piece end to end, with no human in the middle. The answer is yes. But getting there taught us that writing was the easy half. The hard half was getting the system to know when it was wrong.</p><h3>What the finished agent does</h3><p>You pick a competition and load the four most recent completed matches. You choose one, pick what kind of article you want, full Match Report, Star Player Performance, Tactical Analysis, Timeline Summary, and hit generate.</p><p>Behind that one button, the agent runs a pipeline:</p><pre>ESPN API → Match Context → Groq writes the article → Groq evaluates the article → You</pre><p>It pulls the raw match data from ESPN’s public soccer API (scores, goals, cards, substitutions, key events), decides what extra context the story needs based on the competition, hands a tightly-constrained prompt to Groq’s LLaMA 3.3 70B model, and gets back a match report written in a BBC Sport / ESPN voice. The whole flow is wired together with LangGraph as a state machine, and the front end is a Gradio app running on Hugging Face Spaces.</p><p>The writer is deliberately kept on a short leash. Its prompt says, in effect: use only the facts you’re given, invent nothing, tell the match chronologically, highlight the standout players. That keeps the prose lively without letting the model drift into fiction.</p><p>But “tell the model not to lie” is not the same as knowing whether it did. That’s where the final build comes in.</p><h3>An editor that fact-checks the writer</h3><p>The single most important addition is a second AI in the loop<strong> </strong>an evaluator whose entire job is to catch the first one making things up.</p><p>After the article is written, we send it back to Groq, this time with a completely different brief. It plays the role of a practical sports editor: it gets both the generated article and the original source data, and it checks them against each other across six categories:</p><ul><li><strong>Factual correctness: </strong>do the teams and the result match the data?</li><li><strong>Hallucination check</strong> : are there invented players, goals, cards, or stats?</li><li><strong>Score consistency</strong> : is the full-time score right, and are penalties/aggregate treated as separate facts?</li><li><strong>Event consistency: </strong>do the goals and key moments line up?</li><li><strong>Focus compliance: </strong>did it actually write the kind of article we asked for?</li><li><strong>Writing quality: </strong>rated poor → excellent (this one doesn’t affect pass/fail).</li></ul><p>It returns a structured JSON verdict pass or fail per category, a list of specific issues, and a plain-English summary paragraph explaining why and which the app renders as a readable Evaluation Report right under the article.</p><p>The design decision we’re proudest of here is restraint. An evaluator that fails everything is useless, so we explicitly told it to be lenient: when in doubt, pass. It only fails for material errors a wrong score, a swapped team, an invented goalscorer. A 1–1 draw that one side wins on penalties? Completely correct, as long as the article states both facts. Good journalism doesn’t get punished for style; only broken facts do.</p><p>We also hardened the plumbing: the evaluator is told to return JSON only, and our code strips stray markdown fences and falls back to safe defaults if the model ever returns something malformed. A self-checking agent that crashes when its checker hiccups isn’t much of a safety net.</p><p>This is the piece that closes the loop. The system no longer just produces output it produces output with a verdict on whether that output can be trusted.</p><h3>New in this build : World Cup group-stage</h3><p>The other big addition is <strong>FIFA World Cup</strong> group-stage support, and it’s a good example of why context-awareness matters.</p><p>A league result and a group-stage result <em>mean</em> different things. “Won 2–0” in the Premier League is a table story; “Won 2–0” in a World Cup group is a <em>qualification</em> story it might secure advancement, or leave a third team sweating on goal difference. So for World Cup matches, the agent fetches the live group standings, finds the group both teams are in, and feeds the writer the real stakes: positions, points, goal difference, and the rules that decide who goes through (top two advance, best third-placed teams progress, tiebreakers in order).</p><p>To be precise about scope: this is group-stage context, not a full knockout bracket simulator. Knockout handling lives on the Champions League side, where the agent automatically reconstructs two-leg ties by scanning the matches around the selected game and summing the<strong> </strong>aggregate score to work out who advanced. Different competition, different context, same idea: the agent decides what the story needs before it writes a word.</p><h3>Under the hood</h3><p><strong>ESPN public soccer API</strong>: Free, structured, live; with scoreboards, summaries, and standings. <strong>Generation</strong>: Groq · LLaMA 3.3 70B (temp 0.6) : Fast, fluent, and easy to constrain with a strict prompt. <strong>Evaluation</strong>: Groq · LLaMA 3.3 70B (temp 0.2) Lower temperature for consistent, conservative judgments. <strong>Orchestration: </strong>LangGraph, Each step is a node; state flows through cleanly. <strong>Interface: </strong>Gradio on Hugging Face Spaces One-click public demo, no front-end work</p><p>The agent graph now runs all the way through to the evaluator so the verdict is a first-class part of the pipeline, not a bolt-on.</p><h3>What’s next: more leagues, more tournaments</h3><p>The whole system was built to grow. Because every competition is just a code mapped into a single configuration table, adding a new one is mostly a matter of plugging it in and letting the same pipeline fetch, contextualize, write, evaluate do the rest.</p><p>So the next phase is breadth. On the league side, we want to push well past the Big 5: the Eredivisie, the Primeira Liga, the Süper Lig, the Championship, and other domestic divisions, so the agent can cover the games people actually follow week to week, not just the headline five. On the tournament side, we want to add the Europa League and the Conference League, domestic cups like the FA Cup and the Copa del Rey, and continental competitions beyond Europe. We’d also like to take the World Cup from group-stage context all the way through the knockout bracket, and bring the same treatment to the Euros and the Copa América.</p><p>The plumbing for most of this already exists. The interesting work is teaching the agent the stakes unique to each format, so the writing always knows what a result actually means: a relegation six-pointer, a cup upset, a two-legged tie on a knife’s edge. Get that right across enough competitions, and the agent stops being a Big-5 demo and starts being something that could cover a whole football weekend on its own.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6dc3a996ed67" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Autonomous Football Data Journalist Agent]]></title>
            <link>https://medium.com/@omernimer05/autonomous-football-data-journalist-agent-aa84d88b325e?source=rss-ac4f98a95592------2</link>
            <guid isPermaLink="false">https://medium.com/p/aa84d88b325e</guid>
            <dc:creator><![CDATA[Omernimer]]></dc:creator>
            <pubDate>Sun, 03 May 2026 12:03:13 GMT</pubDate>
            <atom:updated>2026-05-03T12:03:13.456Z</atom:updated>
            <content:encoded><![CDATA[<blockquote><strong>Team Members</strong></blockquote><blockquote><strong>Omar Nemer</strong> : 2285276</blockquote><blockquote><strong>Tareq Badran</strong> : 2285612</blockquote><p><strong>1. Project Overview</strong></p><p>Our project is an Autonomous Football Data Journalist Agent that generates professional football match reports automatically. The system collects recent football match data, extracts match results and key events, analyzes important moments, and uses an AI language model to generate a sports-style news article.</p><p>The user can select a football competition, choose one of the latest completed matches, select the type of article focus, and generate a report similar to a BBC Sport or ESPN-style match article.</p><p><strong>2. Technical Approach</strong></p><p>The system follows this pipeline:</p><p>User selects competition</p><p>↓</p><p>System fetches latest completed matches</p><p>↓</p><p>User selects a match</p><p>↓</p><p>System retrieves match details from ESPN API</p><p>↓</p><p>System extracts teams, score, goals, cards, substitutions, and key events</p><p>↓</p><p>System adds knockout or league context</p><p>↓</p><p>System detects standout players</p><p>↓</p><p>Groq LLM generates the article</p><p>↓</p><p>Gradio displays the final result</p><p><strong>3. Data Source</strong></p><p>We are using ESPN’s football data endpoints as our main data source. Instead of scraping web pages, we retrieve structured match information directly from ESPN’s football API endpoints.</p><p>The system extracts:</p><p>* team names</p><p>* final score</p><p>* match status</p><p>* goals</p><p>* yellow/red cards</p><p>* substitutions</p><p>* key match events</p><p>* recent completed matches</p><p>* league standings when available</p><p>*knockout context for Champions League matches</p><p>-This makes the system more reliable than raw web scraping because the data is already structured.</p><p><strong>4. Frameworks and Tools</strong></p><p>We will use the following tools and frameworks:</p><blockquote>Python</blockquote><p>Used for data collection, preprocessing, cleaning, and structuring match data.</p><blockquote>ESPN Football API</blockquote><p>Used to retrieve match results, match events, latest completed matches, and standings.</p><blockquote>Groq</blockquote><p>Used as the LLM provider for generating high-quality football news articles.</p><blockquote>LangGraph</blockquote><p>Used to design the agent workflow as a sequence of nodes, such as selecting league, loading matches, preparing context, adding league/knockout context, detecting standout players, and generating the article.</p><blockquote>Gradio</blockquote><p>Used to create the web interface where users can select the competition, match, and article focus.</p><blockquote>Hugging Face Spaces</blockquote><p>Planned deployment platform for the final Gradio application.</p><blockquote>Medium / GitHub</blockquote><p>The report and documentation will be shared through the project blog post or GitHub repository.</p><p><strong>5. Main System Components</strong></p><h4>Match Selection Module</h4><p>The user selects between big 5 Leagues:</p><p>* Premier League</p><p>* La Liga</p><p>* Serie A</p><p>* Bundesliga</p><p>* Ligue 1</p><p>* European Tournaments</p><p>* Champions League</p><p>After choosing the competition, the system loads the latest four completed matches.</p><h4>Match Detail Extraction Module</h4><p>After the user selects a match, the system retrieves full match details, including the final score and key events.</p><p>Context Builder</p><p>The extracted data is converted into a structured JSON format. This includes:</p><p>{</p><p>“match”: “Team A 2–1 Team B”,</p><p>“status”: “Full Time”,</p><p>“goals”: [],</p><p>“cards”: [],</p><p>“substitutions”: [],</p><p>“key_events”: [],</p><p>“league_context”: {},</p><p>“knockout_context”: {},</p><p>“standout_players”: []</p><p>}</p><h4>Standout Player Detection</h4><p>The system identifies standout players based on important events such as goals and decisive contributions.</p><p>League / Knockout Context</p><p>For league matches, the system attempts to add standings information.</p><p>For Champions League matches, the system adds knockout context and handles aggregate-related information when available.</p><h4>Article Generation</h4><p>The final JSON context is passed to Groq. The prompt instructs the model to write in a professional BBC/ESPN-style football journalism tone while only using the provided facts.</p><h4>User Interface</h4><p>The Gradio interface allows users to:</p><p>* select competition category</p><p>* select league or tournament</p><p>* load latest four completed matches</p><p>* choose a match</p><p>* select article focus</p><p>* generate article</p><p><strong>6. Article Focus Options</strong></p><p>The user can choose from:</p><p>* Full Match Report</p><p>* Star Player Performance</p><p>* Key Match Moments</p><p>* Tactical Analysis</p><p>* Timeline Summary</p><p>* Short News Summary</p><p>-This makes the system more flexible and allows different styles of output from the same match data.</p><h4><strong>7. Team Responsibilities</strong></h4><p>Omar Nemer</p><p>* Designing the system pipeline</p><p>* Implementing the ESPN API data collection</p><p>* Extracting match results and key events</p><p>* Building the article context structure</p><p>* Testing match data extraction</p><p>Tareq Badran</p><p>* Implementing Groq article generation</p><p>* Designing the Gradio interface</p><p>* Working on LangGraph workflow design</p><p>* Testing article quality and prompt improvements</p><p>* Preparing documentation and blog/repository updates</p><p>Both team members will work together on debugging, evaluation, deployment, and final presentation.</p><p><strong>8. Evaluation Plan</strong></p><p>We will evaluate the system using:</p><h4>Factual Correctness</h4><p>Checking whether the generated article correctly mentions:</p><p>* teams</p><p>* final score</p><p>* goal scorers</p><p>* key events</p><p>* match outcome</p><h4>Consistency</h4><p>The article should not invent players, scores, standings, or events.</p><h4>Readability</h4><p>The generated article should sound like a real sports report, not a raw event list.</p><h4>User Control</h4><p>We will test whether different article focus options produce different and relevant article styles.</p><p><strong>9. Current Progress</strong></p><p>So far, we have completed:</p><p>* fetching latest completed matches</p><p>* selecting from Big 5 leagues and Champions League</p><p>* retrieving ESPN match details</p><p>* extracting key events</p><p>* cleaning null or useless events</p><p>* generating structured JSON context</p><p>* integrating Groq for article generation</p><p>* building a Gradio prototype</p><p>* improving prompts to reduce hallucination</p><p>* adding standout player and competition context logic</p><p><strong>10. Expected Final Outcome</strong></p><p>By the end of the project, we expect to deliver:</p><p>* a working AI football journalist web app</p><p>* a Gradio interface deployed on Hugging Face Spaces</p><p>* a GitHub repository with the source code</p><p>* a blog post explaining the technical workflow</p><p>* sample generated football articles</p><p>* evaluation results showing article quality and factual accuracy</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=aa84d88b325e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building an Autonomous Football Journalist Agent]]></title>
            <link>https://medium.com/@omernimer05/building-an-autonomous-football-journalist-agent-cc4e25170107?source=rss-ac4f98a95592------2</link>
            <guid isPermaLink="false">https://medium.com/p/cc4e25170107</guid>
            <dc:creator><![CDATA[Omernimer]]></dc:creator>
            <pubDate>Sun, 12 Apr 2026 11:28:46 GMT</pubDate>
            <atom:updated>2026-04-12T11:28:46.484Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>AI-Based Match &amp; Statistics News Generator</strong></p><p>By Omar Nemer(2285276) &amp; Tarek Badran(2285612)</p><p><strong>Introduction</strong></p><p>Football match data is everywhere but most of it exists in messy, unstructured formats like articles, reports, and web pages. Extracting meaningful insights from this data takes time and effort.</p><p>What if an AI system could do this automatically?</p><p>In this project, we build an Autonomous Football Journalist Agent, an AI-powered system that analyzes match data and generates professional, human-like sports news articles.</p><p><strong>Project Overview</strong></p><p>The goal of this project is to develop an agentic AI system that acts like a sports journalist.</p><p>The system takes raw football match data and transforms it into a structured news article that includes:</p><ul><li>A compelling headline</li><li>A match summary</li><li>Key highlights</li><li>Player performance insights</li></ul><p>Instead of simply summarizing text, the agent analyzes, decides what matters, and writes like a journalist.</p><p><strong>How the System Works:</strong></p><p>The project is built around a pipeline that combines data extraction, analysis, and generation.</p><p><strong>1. Data Collection &amp; Extraction.</strong></p><p>We start by collecting football match data from online sources.</p><p>The pipeline includes:</p><ul><li>Fetching webpages using Python.</li><li>Extracting main content using Trafilatura.</li><li>Using BeautifulSoup as a fallback for structured data (scores, teams, events)</li></ul><p>This step transforms messy web content into usable data.</p><p><strong>2. Agent Workflow Design</strong></p><p>We use an agent-based workflow to simulate decision-making.</p><p>The agent:</p><ul><li>Receives extracted match data.</li><li>Structures and analyzes the information.</li><li>Identifies key insights (e.g., dominant team, standout players)</li><li>Selects what is most newsworthy.</li></ul><p>This is not just automation, it’s autonomous reasoning.</p><p><strong>3. Tool Integration</strong></p><p>The system relies on two main tool categories:</p><ul><li>Python → data processing and analysis.</li><li>Web extraction pipeline → retrieving and structuring match data.</li></ul><p>These tools allow the agent to interact with real-world data.</p><p><strong>4. Article Generation</strong></p><p>Once the important insights are selected, the system generates a full news article using a language model.</p><p>The output mimics professional football journalism, ensuring:</p><ul><li>Clear structure</li><li>Readability</li><li>Informative content</li></ul><p><strong>5. Autonomous Decision Loop</strong></p><p>One of the key innovations of this project is the decision loop.</p><p>The agent:</p><ul><li>Generates multiple possible insights.</li><li>Evaluates their importance.</li><li>Selects the most relevant ones.</li><li>Produces the final article.</li></ul><p>This makes the system smarter than simple summarization tools.</p><p><strong>6. Evaluation Framework</strong></p><p>To ensure quality, we evaluate the system based on:</p><ul><li>Accuracy of extracted data</li><li>Consistency between data and generated text</li><li>Readability and clarity of the article</li></ul><p>7. Interface &amp; Deployment</p><p>To make the system usable, we build:</p><ul><li>A user interface using Gradio</li><li>Deployment via Hugging Face Spaces</li></ul><p>-This allows users to interact with the agent directly through a web interface.</p><p><strong>Motivation</strong></p><p>Football data is often difficult to process due to its unstructured nature.</p><p>This project aims to:</p><ul><li>Reduce manual effort in analyzing match reports</li><li>Automate sports journalism</li><li>Make football insights more accessible and structured</li></ul><p><strong>Problem Type</strong></p><p>This project sits at the intersection of several domains:</p><ul><li>Information Extraction</li><li>Data-to-Text Generation</li><li>Autonomous Decision-Making</li></ul><p>It requires both understanding raw data and generating meaningful content.</p><p><strong>Fields Involved</strong></p><ul><li>Artificial Intelligence</li><li>Natural Language Processing (NLP)</li><li>Data Science</li><li>Sports Analytics</li></ul><p><strong>What Problems Does It Solve?</strong></p><ul><li>Extracts useful insights from unstructured football data</li><li>Automates match analysis</li><li>Reduces manual workload</li><li>Converts raw data into readable articles</li><li>Identifies key events and player performance automatically</li></ul><p><strong>Expected Outcomes</strong></p><p>By the end of the project, we aim to deliver:</p><ul><li>An AI agent capable of extracting football match data</li><li>Automatically generated news-style articles.</li><li>A working web-based interface.</li><li>Evaluation results demonstrating system performance.</li></ul><p><strong>Technologies Used</strong></p><ul><li>LangGraph → agent workflow and decision-making</li><li>Groq → language model for text generation</li><li>Python → data processing</li><li>Requests, Trafilatura, BeautifulSoup → data extraction</li><li>Gradio → user interface</li><li>Hugging Face Spaces → deployment</li></ul><p><strong>Final Thoughts</strong></p><p>This project demonstrates how AI can move beyond simple automation into intelligent content creation.</p><p>By combining data extraction, reasoning, and generation, we are essentially building a system that thinks and writes like a journalist, but operates at machine speed.</p><p>This is just the beginning of what autonomous agents can achieve in the world of media and data.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cc4e25170107" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>