DEV Community

Cover image for My BCG X GenAI Job Simulation: Building a Financial Analysis Chatbot & Key Learnings
Kamaumbugua-dev
Kamaumbugua-dev

Posted on

My BCG X GenAI Job Simulation: Building a Financial Analysis Chatbot & Key Learnings

How a virtual internship sharpened my skills in data wrangling, business logic, and user-centric AI development.


From Theory to (Simulated) Practice

We all have projects in our portfolios, but how do we know if they truly reflect the skills needed in a real-world, high-stakes environment? That was my goal when I completed the BCG X GenAI Job Simulation on Forage.

The task was classic BCG: practical, business-focused, and impactful. I was challenged to build a functional prototype of a Generative AI tool for financial statement analysis. This wasn't just about writing code; it was about creating a solution that a consultant could use to quickly derive insights from complex company data.

In this article, I'll walk you through the project and, more importantly, the core skills I honed along the way.

The Project: A Financial Query Bot

The core deliverable was a Python-based chatbot that could answer natural language questions about a dataset of company financials. The dataset was in a long format, meaning financial terms (like 'Total_Revenue' and 'Net_Income') were rows, not columns.

Here's a high-level overview of the solution I built:

# 1. Data Wrangling: From Long to Wide Format
df_wide = df.pivot(index=['Company', 'Year'], columns='Financial_Term', values='Value').reset_index()

# 2. Core Logic & Metric Calculation
total_revenue = df_wide['Total_Revenue'].sum()
net_income_change = df_wide_sorted['Net_Income'].iloc[-1] - df_wide_sorted['Net_Income'].iloc[-2]
highest_revenue_company = df_wide.groupby('Company')['Total_Revenue'].sum().idxmax()

# 3. The Chatbot Interface
def simple_chatbot(user_query):
    # ... NLP logic to match queries with pre-calculated answers
    if text == "what is the total revenue":
        return f"The total revenue is {total_revenue:,.2f}."
    # ... other queries
Enter fullscreen mode Exit fullscreen mode

The final product was an interactive command-line tool that could instantly answer questions like:

  • "What is the total revenue?"
  • "How has net income changed over the last year?"
  • "Which company has the highest revenue?"

The Skills Forged in the (Simulated) Fire

While the code is crucial, the simulation forced me to think and operate like a BCG X developer. Here are the key skills I developed:

1. Data Engineering & Wrangling with pandas

The raw data wasn't ready for analysis. My first step was to pivot the DataFrame from a long to a wide format. This is a common, critical task in data science. I solidified my understanding of pandas operations like pivot(), groupby(), and sort_values() to structure data for efficient computation.

2. Translating Business Logic into Code

This was the heart of the simulation. It wasn't enough to just calculate a sum; I had to understand what to calculate and why.

  • "How has net income changed?" required me to sort the data by year and calculate the difference between the two most recent entries. This honed my ability to implement time-series analysis logic.
  • "Which company has the highest revenue?" involved a groupby operation to aggregate data by company before identifying the maximum. This reinforced data aggregation techniques for business intelligence.

3. Prototyping with Generative AI Principles

While the chatbot used a rule-based approach (pattern matching), its design embodies a core principle of GenAI: creating a natural language interface for complex systems. I learned to structure a system where a user's unstructured query is mapped to a structured data operation, which is the foundational concept behind many sophisticated AI tools.

4. User-Centric Development & UX

A tool is useless if no one can use it. I built an interactive loop with clear user prompts, a help menu, and graceful handling of exit commands. Focusing on the user experience, even in a CLI, taught me to think beyond the algorithm and consider the human interacting with my code.

5. Code Readability and Maintainability

I made sure to write clean, commented, and well-structured code. Using functions, clear variable names (net_income_change instead of nic), and f-strings for formatted output are essential practices for collaborating in a professional environment, just as one would at a firm like BCG X.

Key Takeaways for My Developer Journey

  • Business Acumen is a Feature: The most elegant code is worthless if it doesn't solve a real business problem. This simulation was a constant exercise in aligning technical execution with business needs.
  • Start Simple, Then Scale: A rule-based chatbot was the perfect prototype. It proved the concept's value before needing the complexity of LLM API calls, prompt engineering, and associated costs.
  • The "Why" Matters as Much as the "How": Understanding why a consultant needs to see net income change is what led me to implement the correct sorting logic. Context is everything.

Final Thoughts

The BCG X GenAI Job Simulation was more than a certificate for my LinkedIn profile. It was a rigorous, practical test of my ability to deliver an end-to-end solution under realistic constraints. It pushed me to merge data skills with business thinking, and it gave me a tangible project that demonstrates my readiness to contribute in a tech-driven, strategic role.

If you're a student or a developer looking to break into the tech/consulting space, I highly recommend seeking out these simulations. They are a powerful way to bridge the gap between academic knowledge and industry application.


Have you completed a similar job simulation or built a project that taught you unexpected skills? Share your experience in the comments below! Let's learn from each other.

Top comments (0)