Inspiration

We were inspired by recent news regarding misinformation in the digital age. The ease with which unverified content is accepted, coupled with the potential for AI to both generate and disseminate false information, motivated us. Our primary inspiration was to leverage powerful AI tools to combat this problem, rather than contribute to it, by helping users find trustworthy information and empowering them to see the source evidence for themselves.

What it Does

Clarity provides users with a reliable verdict on the veracity of news claims. The user submits a question or a news link to our system. The entire process is handled by a two-stage AI Agent pipeline, both powered by the LLM Gemini-2.5-Flash:

  • Agent 1 (root_agent): This agent uses the custom-integrated World News API tool to search for up to three relevant news articles from verified sources based on the user's query.

  • Agent 2 (fact_checker_agent): The articles, including their text and URLs, are passed to this second agent, which acts as an expert fact-checker. It partially decides the verdict (TRUE, FALSE, or AMBIGUOUS) by cross-referencing the evidence using a Chain of Thought (CoT) prompting technique. The Google Search tool is used to gather more information from the given links if further investigation is needed.

The final response includes the clear verdict and, most importantly, the source links used by the agent for the user to verify the evidence directly.

How We Built It

The project is built as a highly scalable, multi-service architecture designed for deployment on Google Cloud Run.

  • Backend: We use FastAPI to handle the API endpoints, including user authentication via Firebase and chat history persistence with Firestore.

  • Agent Pipeline: The core logic is powered by two orchestrated agents using the Google ADK: the Search Agent utilizes the custom World News API tool, and the Fact-Check Agent employs the Google Search tool for advanced context.

  • Deployment: The application is containerized using Docker to ensure a seamless transition from local development to production on Cloud Run.

Challenges We Ran Into

The main technical challenge was designing and implementing the orchestration pipeline for the two AI agents. We had to implement robust JSON parsing to handle potential variations in the raw output of the first LLM Agent (the search results), ensuring that the data was correctly cleaned and formatted into a highly specific, clean prompt for the second agent.

Accomplishments That We're Proud Of

We are proud of successfully learning and implementing new Google tools in a short time, particularly getting started with AI Agents and the Google ADK. Most importantly, we are proud of creating a functional project that actively combats misinformation through the structured, accountable use of AI.

What We Learned

We gained practical knowledge in several key areas:

  • Advanced LLM techniques, such as implementing the Chain of Thought (CoT) pattern in agent instructions for more reliable reasoning.

  • The entire workflow for developing and orchestrating AI Agents using the Google ADK.

  • Best practices for containerizing and deploying a multi-service application on Google Cloud Run.

What's Next for Clarity

We plan to significantly enhance Clarity's capabilities and scalability:

  • Multi-Platform Accessibility (WhatsApp Integration): Deploy the Clarity Agent pipeline directly on WhatsApp using the WhatsApp Business API. This will make the verification service accessible to millions of users instantly, combating misinformation where it spreads fastest.

  • Expand Data Sources: Integrate more news APIs and potentially non-news data APIs to broaden the spectrum of evidence for verification, moving beyond a single source.

  • Long-Term Memory: Fully implement session persistence with Firestore to allow the agent to recall previous conversations and fact-checks, avoiding redundant searches.

Built With

Share this project:

Updates