Inspiration

The idea for Ethical Assistant stemmed from our own frustrations as conscious consumers. While shopping, we often found ourselves wondering, "Is this brand actually ethical, or is it just good at marketing itself that way?" With so many companies making vague claims about sustainability and social responsibility, it became increasingly difficult to separate genuine efforts from greenwashing.

We realized that there was a gap in the way consumers access and understand ethical information about the brands they support. Most ethical ratings are buried in long reports or scattered across websites. We wanted to create something that allows people to ask simple questions and get clear, direct answers based on structured data. Thus, Ethical Assistant was born.

What it does

Ethical Assistant is a conversational web application that allows users to interact with a chatbot to learn more about various brands and their ethical practices. Users can ask the assistant questions such as "How ethical is Patagonia?" or "Does Shein use fair trade materials?" and receive a concise but comprehensive summary of the brand's ethical ratings and practices.

Behind the scenes, the assistant uses a generative AI model to interpret the user's question and respond with information that includes:

  • Labor practices and fair trade involvement
  • Environmental impact including carbon rating and use of recycled materials
  • Animal welfare and cruelty-free certifications
  • Corporate governance and public transparency
  • Initiatives like renewable energy use, supply chain audits, diversity practices, and ethical innovations

The chatbot is powered by a structured dataset of well-known brands across industries like apparel, food, personal care, and household goods. Each brand is scored based on multiple criteria, helping users make informed decisions quickly and easily.

How we built it

We built Ethical Assistant using Streamlit as the frontend framework to create a clean and interactive web interface. Streamlit made it easy to manage session states, capture user input, and render dynamic responses in a visually friendly format.

For the backend logic, we integrated with the Gemini API, a generative AI platform that helps process and answer natural language queries. The application feeds the user prompt to the Gemini model and receives an AI-generated answer tailored to the context of ethical brand analysis.

We also created a custom Python function that maps brands in the dataset to their respective ratings. The chatbot combines this structured data with generative responses, resulting in answers that are both factually grounded and conversational.

Key features include:

  • Dynamic user chat input using Streamlit's st.chat_input
  • Chat history persistence using st.session_state
  • Custom feedback mechanism allowing users to rate responses using thumbs up or down
  • Response generation using Gemini's generate_content method

The dataset itself was compiled manually from various public reports and ethical brand trackers. We designed it in CSV format with clear fields such as labor_rating, carbon_rating, transparency, renewable_energy, and more.

Challenges we ran into

One of the biggest challenges was managing the balance between structured data and generative text. While it's easy to simply feed raw data to a chatbot, ensuring that the responses remain grounded in factual information without sounding robotic was more difficult than anticipated.

We also faced challenges around user interaction. Designing a conversational interface that feels helpful without overwhelming the user took several iterations. Streamlit offered great tools, but working around its limitations in state management required careful planning.

Another technical hurdle was rate-limiting and error handling with the Gemini API. Ensuring the system remains robust even if a query fails was essential to maintaining a smooth user experience.

Accomplishments that we're proud of

  • Built a fully functional ethical brand chatbot in a short period
  • Designed a feedback mechanism that allows the assistant to learn and improve responses over time
  • Created a scalable, modular architecture that separates UI, backend logic, and data handling
  • Curated a dataset that scores brands across 15+ ethical dimensions
  • Successfully integrated generative AI in a way that complements factual brand analysis

What we learned

We learned that ethical consumption is an area with growing interest but limited accessible tools. Many consumers care deeply about sustainability, fair labor, and animal welfare, but need better ways to navigate this information.

From a technical standpoint, we gained experience in deploying generative AI responsibly by pairing it with fact-checked structured data. We also learned about managing conversational UI elements and maintaining user state across interactions.

Additionally, we improved our understanding of how to present complex data in simple, digestible formats using natural language generation. It was also a valuable exercise in user-centered design and iterative feedback.

What's next for Ethical Assistant

We have several ideas for the future of this project:

  1. Expand the Brand Database
  • Add more brands across different industries, including electronics, beauty, and groceries
  • Include smaller local brands and highlight ethical startups
  1. User Customization and Filters
  • Allow users to prioritize what's most important to them, such as climate impact vs. labor rights
  • Add toggles or sliders for custom ethical scoring
  1. Feedback-Driven Learning
  • Use user feedback to improve future responses and identify where the data or messaging needs refinement
  1. Mobile Optimization and PWA Support
  • Make the assistant accessible on-the-go via a mobile-friendly interface
  1. Open Source Contributions and Community Ratings
  • Open the project to community input where users can contribute new brands, submit evidence, or vote on ratings
  1. Gamification and Education
  • Add a quiz or interactive game to educate users about ethical consumerism while making the app more engaging

We believe Ethical Assistant can be a helpful tool in pushing for more transparent and responsible consumption, and we’re excited about its potential to grow.


Built With

  • generativeai
  • langchain
Share this project:

Updates