11:59 Blog

Behind the Scenes of Nebula: The Tech That Powers Our GenAI Accelerator

Written by Justin Coker | Oct 16, 2024 7:59:56 PM

At 11:59, we’re excited to debut Nebula, our GenAI accelerator that can build a Knowledge Base GenAI system in AWS in just minutes. We wanted to share some of the nuts and bolts of how Nebula works under the hood for tech enthusiasts. Whether you’re interested in the application itself, the AI that powers it, or the infrastructure that makes it all possible, here’s a breakdown of what’s happening behind the scenes. 

The Application: Serverless and Scalable 

Nebula’s user-facing application is built using Vue.js, a lightweight and flexible JavaScript framework that makes the front end fast and responsive. On the back end, we’ve built a serverless application that runs on an AWS Serverless stack. This means it scales effortlessly and efficiently, handling everything from user authentication to processing requests. 

Here’s a quick rundown of the key AWS services we use: 

  • Amazon Cognito: Handles user authentication and authorization so users can securely sign up, log in, and manage their profiles. 
  • API Gateway: Routes all the requests from the front end to the back end, allowing us to define RESTful APIs easily. 
  • AWS Lambda: Powers the serverless functions that handle logic and data processing without provisioning or managing servers. 
  • S3 with CloudFront: Hosts our website and serves static content through CloudFront’s content distribution network, ensuring a fast and reliable experience for users globally. 

Together, these services create a serverless stack that’s not only cost-effective but also scales automatically to meet the demands of our users. 

GenAI: Powering Nebula with AWS Bedrock 

At the core of Nebula’s GenAI capabilities is AWS Bedrock, which provides a foundation for building and integrating AI into applications. Specifically, we’re using Claude 3 Sonnet as our foundation model for natural language processing. This model helps Nebula understand and respond to users’ queries, enabling the creation of knowledge-based systems with powerful AI-driven insights. 

For embeddings—a way of representing text as numerical data—we’re using Titan Embedded Text V2. Embeddings to essentially convert words, sentences, or documents into vectors (multi-dimensional arrays of numbers) that capture the semantic meaning of the text. This makes it easier for the AI to process and compare pieces of information efficiently, especially when it comes to searching or summarizing large datasets. 

We store these embeddings using OpenSearch Serverless, allowing for fast and accurate vector storage and retrieval. Bedrock Knowledge Bases also works natively with Aurora Postgres (pgvector), Pinecone, Redis, or MongoDB Atlas, but we chose OpenSearch Serverless for its relatively low cost and simplicity.  

To tie it all together, we use  Bedrock Knowledge Bases to perform the retrieval augmented generation (RAG). This combination of models, embeddings, and vector storage makes Nebula’s GenAI intelligent and lightning-fast when  processing complex information from large knowledge bases. 

Infrastructure as Code: Easy Deployment with CDK 

We’ve embraced Infrastructure as Code (IaC) using the AWS Cloud Development Kit (CDK) to make deploying Nebula into any AWS account a breeze. CDK allows us to define our infrastructure in familiar programming languages, and then it gets converted into CloudFormation templates for deployment. For items not covered natively by CloudFormation/CDK (such as creating an OpenSearch Serverless index), we relied on CloudFormation Custom resources to invoke Lamba functions to accomplish the necessary tasks. 

This approach gives us the flexibility to version control our infrastructure, share it across teams, and ensure that every deployment of Nebula is consistent, secure, and scalable. Plus, it makes life much easier for anyone looking to deploy Nebula into their AWS environment. With just a few commands, they can spin up all the necessary resources and start building their own Knowledge Base GenAI systems without worrying about complex setup processes. 

Try Nebula Yourself 

Curious to see how Nebula works? You can check it out and test it right now by visiting our GitHub repository: Nebula on GitHub. Whether you want to deploy it into your own AWS environment or dig into the code to see how we’ve built it, Nebula is ready for you to explore. And since it’s open source, you’re welcome to contribute, provide feedback, or customize it for your own use cases!