Inspiration
The modern enterprise is drowning in unstructured data. Companies have thousands of contracts, meeting notes, SOPs, financial reports, and roadmaps scattered across drives. Important knowledge gets buried, and nobody can remember everything.
Current AI solutions are glorified "PDF Chatbots" that only answer basic questions like "What is our leave policy?" We realized that businesses don’t need another chatbot—they need an AI Chief Operating Officer (COO). We built CompanyBrain_AI to go beyond basic retrieval. We wanted an autonomous system that could actively read all company documents, uncover hidden financial exposures, highlight delayed projects, and tell management exactly what to focus on next quarter.
What it does
CompanyBrain_AI acts as an autonomous AI Executive Advisor for your business. Once a user uploads a folder of company documents, the system:
- Organizes Knowledge: Parses and semantically indexes the entire corpus of business files.
- Generates Contextual Insights: Automatically identifies revenue trends, operational bottlenecks, and customer insights.
- Automates Risk Analysis: Calculates a real-time Risk Score by digging through contracts and reports to detect compliance gaps and financial exposures.
- Acts as a Strategic Advisor: Combines internal company data with live external market research to generate actionable, multi-quarter strategic action plans.
How we built it
We built CompanyBrain_AI using a modern, serverless AI stack designed for extreme speed and scalability:
- Frontend & Backend: Built entirely on Next.js 14 (App Router) with React and TailwindCSS for a premium, dark-mode "Executive Dashboard" aesthetic.
- AI Engine: We utilized LangChain to orchestrate the RAG pipeline, powered by Groq running the blazing-fast Llama 3.3 (70B) model.
- Vector Database: We implemented an in-memory vector store utilizing hierarchical navigable small world (HNSW) graphs to instantly retrieve semantic document chunks.
- Database: We integrated the Firebase Admin SDK (Firestore) to securely manage document metadata and system state.
- Market Research: We integrated the Tavily Search API to fetch live external industry trends to cross-reference with internal company strategy.
Challenges we ran into
Our biggest challenge was LLM Hallucination and "Laziness". Initially, when asked to analyze risks across multiple contracts, the AI would group them together and output generic advice like "You have third-party vendor risks." This wasn't good enough for an AI COO.
We had to engineer a strict "Anti-Hallucination Protocol" at the prompt level. We forced the LLM to extract unique, project-specific clauses, exact dollar amounts, and explicit deadlines strictly from the vector context. Furthermore, we had to build robust custom Regex parsers in our API routes to handle instances where the LLM wrapped its JSON responses in conversational markdown, which initially caused our Next.js backend to throw 500 errors.
Accomplishments that we're proud of
We are incredibly proud of the Risk Analysis Dashboard. Seeing the AI successfully read a raw, unstructured "Project Update" text file, instantly realize that a project is over-budget, and automatically spike the red "Overall Risk Score" on the dashboard felt like magic. We successfully bridged the gap between raw data storage and high-level C-suite intelligence.
What we learned
We learned that context is king. An LLM is only as smart as the data you feed it, and engineering a highly accurate retrieval pipeline is far more important than the model itself. We also learned the intricacies of wrangling large LLMs (like Llama 3.3 70B) into returning perfectly structured JSON arrays for dynamic React frontends without crashing.
What's next for CompanyBrain_AI
We plan to evolve CompanyBrain_AI from a single AI COO into a Multi-Agent Corporate Board. Specialized Agents: We want to introduce an AI CFO (for deep financial modeling) and an AI Legal Counsel (for automated contract redlining). Live Integrations: Building direct Webhook integrations into Google Drive, Slack, and Jira so the "Brain" updates its vector knowledge base in real-time as the company works.
Built With
- chromadb
- firebase
- firestore
- groq
- langchain
- llama3
- next.js
- react
- shadcn/ui
- tailwindcss
- tavily
- typescript
Log in or sign up for Devpost to join the conversation.