Skip to content
Layer
Client
Layer
Services
AI Development
Backend Development
Infrastructure Development
Integrations
Industry
AI, SaaS
Stage
Seed

Streamlining LLM-powered copilots with Layer and OpenAI API’s GPT-4

We worked with Layer on core features and approaches that would allow their platform to simplify the deployment of LLM-powered copilots.

Our impact

Layer is at the forefront of AI innovation with LLM-powered copilots.

Overview

Layer’s Integration Expert platform helps API vendors make it easier for developers to set up their products. They are working to simplify the deployment of copilots as experts on specific software platforms.

In contrast to chatbots, which are limited to answering questions, copilots can take actions on the user’s behalf, like a personal assistant with expert knowledge of a platform. The drawback is that copilots can be difficult and costly to use, hence Layer’s mission to make them easier to build and deploy, as well as more dynamic in how they help users.

The Vision

Layer’s plan for simplifying copilot deployment revolves around two core functionalities: ingesting platform-specific documentation to facilitate a Q&A experience and describing site functionality through “Invokables” or “Paths.” These paths allow for a more dynamic interaction with the copilot, enabling it to decide whether to complete a task or answer a question based on user queries.

Why Lazer?

To showcase Layer’s copilot capabilities into various categories, we were brought in to quickly develop custom tools that range from basic to advanced environments. With specialized expertise in AI, we showcased a combination of tools including GPT-4, Langchain, AI agents, and more, tailoring them to different cases developed alongside the Layer team.

The Layer Assistant copilot window opened over a Django documentation page, with a Layer Park welcome message

approach

Developing copilots for diverse tasks

In giving the user full autonomy on a platform, there are endless paths that can be taken.

With this in mind, we developed different copilots to handle specific scenarios and adapt to the request of the user.

BasicCopilot: Executes one or more Invokables based on user queries

FallbackCopilot: Provides Q&A responses in case of errors during Invokable execution

PlanAndConfirmCopilot: Presents a plan to users before executing any Invokables

QuestionAnswerCopilot: Dedicated solely to Q&A

RouterCopilot: Determines whether executing Invokables or providing a Q&A response is best for a given user query

Layer Park in light and dark mode, showing a playground with boxes, a progress bar and an image, and a list of toys

approach

Creating an interactive demo

To demonstrate the full extent of the platform, we implemented a demo that allows the user to design a tailored dashboard by providing a set of prompts.

The demo utilizes a local vector store that executes a list of functions in a particular order and abstracts the complexity to only a single prompt. Another demo we made, Layer Park, showcases Layer’s SDK for the user to understand its technical capabilities.

To engage with the demo, here are the prompts available:

“Set to light/dark mode”

“Add technical analysis for GOOGL”

“Add news tv box widget”

“Create me a ticker for GOOGL”

“Create me a new dashboard”

“Reset dashboard”

“Clear dashboard”

“Change chart box symbol to USDCAD”

“Change chart box interval to 1 minute”

“Change ticker symbol to TSLA”

“What widgets are available?” for Q&A prompts”

A crypto dashboard with price, news and fear and greed widgets, overlapped by a Bitcoin price chart

approach

Automatically detecting Invokables

We developed Layer’s "Builder" tool to enhance the user experience and further simplify the process of creating each function, also known as Invokables.

The tool auto-detects Invokables on specific site routes and generates a configuration file that can feed into the SDK. This accelerates the development as it removes the need to write each and every piece of functionality the user desires.

The Python logo with three iridescent asterisk shapes

approach

Developing a backend for document ingestion

By navigating our development through the lens of the user, we aimed to provide various solutions for different situations.

Our Python and Flask-based backend allows for document ingestion organized by the user that can be equipped to answer specific Q&A prompts, enabling the user to further extend the platform.

An iridescent 3D lattice sphere in pink, blue and green

approach

Leveraging Langchain to solve “path abstraction”

The development of each copilot required various Invokables (functions) to carry out in a particular order (referred to as a “Path”).

However, this list was required to guarantee that some Invokables be executed after others and a way for users to confirm the execution of these Invokables.

This unpredictable problem required us to implement Langchain for us to gain control of the order of execution, but also provided some limitations that make the solution unreliable at times. As a result, we architected solutions for edge cases while leveraging Langchain’s custom agents and Router Chain.

The Google Cloud logo

approach

Establishing architecture with Google Cloud

While working with innovative technologies, it's beneficial to invest in reliable tools.

To ensure a robust and scalable architecture, we utilized a suite from Google Cloud Platform (GCP), including Cloud Run, Google Storage, Cloud SQL, and Compute Engine. This infrastructure allowed us to host ChromaDB and ensure seamless integrations with other platforms.

A tilted grid of Layer Park playground screens in dark mode

Conclusion

A journey of innovation and exploration

We’re proud of how much Layer’s platform grew and improved during our time with their team.

Collaborating with Layer was a journey of innovation and exploration, and we thoroughly enjoyed helping them make advances in AI copilot deployment. We’re excited for them to continue their work in this space!

Let’s talk