Product Managers — You need ZERO engineers to prove that an AI app can be built
Integrating artificial intelligence (AI) features has become a hallmark of innovation in product development. Product managers, often the architects of...
🤜🤛 Aporia partners with Google Cloud to bring reliability and security to AI Agents - Read more
Integrating GenAI has become crucial for businesses seeking to gain a competitive advantage in the market. One aspect of this transformation has fast-tracked companies’ push to engaging, human-like chatbots – Large Language Models (LLMs).
Surprisingly, many leaders tend to overestimate the complexity of initiating LLMs into their operations. Contrary to popular belief, getting started with LLMs is remarkably straightforward, and in just two hours, leaders can create a Proof of Concept (POC) with tangible value.
This article aims to demystify the process and provide a short, actionable guide for leaders and engineers.
Embarking on the journey of integrating Large Language Models (LLMs) need not be a time-consuming endeavor. This section provides a concise and actionable guide for leaders and engineers, outlining the steps to create a valuable Proof of Concept (POC) in just two hours.
The first step towards integrating LLMs into your workflow is to pick relevant documents. This can include your knowledge base, product documentation, specifications, contracts, and invoices—all in PDF format. The key here is to choose documents representative of the language and content you want the LLM to understand and process.
Incorporating LLMs becomes effortless by leveraging Embedchain’s user-friendly platform. Start by visiting their website and clicking the “Get Started” button. Embedchain offers a simplified approach to working with LLMs, making it accessible even for those with minimal technical expertise.
First, make sure that you have installed the embedchain library using the following command.
pip install embedchain
Create the following file: (mistral.yaml)
llm:
provider: huggingface
config:
model: 'mistralai/Mistral-7B-Instruct-v0.2'
top_p: 0.5
embedder:
provider: huggingface
config:
model: 'sentence-transformers/all-mpnet-base-v2'
This python script will help you to extract the required information from the provided web pages.
import os
# replace this with your HF key
os.environ["HUGGINGFACE_ACCESS_TOKEN"] = "hf_xxxx"
from embedchain import App
app = App.from_config("mistral.yaml")
app.add("https://www.forbes.com/profile/elon-musk")
app.add("https://en.wikipedia.org/wiki/Elon_Musk")
app.query("What is the net worth of Elon Musk today?")
# Answer: The net worth of Elon Musk today is $258.7 billion.
To enhance the user experience and interaction with the LLM, it is recommended to use Chainlit. This tool allows you to wrap your code with a chatbot user interface, providing a seamless and engaging way for users to interact with the language model. This step elevates the integration process, making it more accessible to a wider audience within your organization.
Install the chainlit library using the following command.
pip install chainlit
This code ensures your chatbot benefits from the simplicity of Embedchain while addressing data privacy concerns by utilizing an open-source model through Chainlit.
import os
# replace this with your HF key
os.environ["HUGGINGFACE_ACCESS_TOKEN"] = "hf_xxxx"
from embedchain import App
from chainlit import Chainlit
# Create an Embedchain App
app = App.from_config(embedchain_config)
# Add documents to Embedchain with Chainlit
app.add(chainlit.annotate("https://www.forbes.com/profile/elon-musk"))
app.add(chainlit.annotate("https://en.wikipedia.org/wiki/Elon_Musk"))
# Query using Embedchain
response = app.query("What is the net worth of Elon Musk today?")
print(response)
# Answer: The net worth of Elon Musk today is $258.7 billion.
In data privacy concerns, addressing any potential issues related to the sensitivity of the information in your documents is crucial. Embedchain allows for a simple 1-line code change in Step 2, enabling you to switch to an open-source model.
With these simple steps, you’ve successfully created a chatbot that interacts with your selected documents. This chatbot has the potential to streamline processes, answer queries, and provide valuable insights based on the content of your documents. The speed and ease with which this can be achieved challenge the common misconception that implementing LLMs is a complex and time-consuming endeavor.
Aporia’s Guardrails offer a layer of security and robustness to your chatbot, filtering and mitigating hallucinations before they impact your end user. With just another 1-line code change, your chatbot is now equipped to handle diverse scenarios, ensuring it operates securely and reliably. This step minimizes the risks associated with GenAI projects and accelerates the process of releasing your chatbot into the real world.
This enhancement allows leaders and engineers to focus on iterating and improving the AI over time, rather than focusing on manual security maintenance. The agility afforded by this approach ensures that your organization can adapt and evolve the chatbot based on user feedback and changing requirements.
The perceived difficulty in getting started with Large Language Models is often overstated. Leaders and engineers can create a valuable Proof of Concept in just two hours by following a few straightforward steps. Leveraging Embedchain’s simplicity, Chainlit’s user interface, and Aporia’s AI Guardrails, the process becomes even more accessible.
The key lies in understanding that implementing LLMs is not an overwhelming challenge but a transformative opportunity that can enhance productivity, efficiency, and user experience across various industries.
Integrating artificial intelligence (AI) features has become a hallmark of innovation in product development. Product managers, often the architects of...
The rise of AI is often depicted in movies as a battle between humans and machines, but the reality is...
Managing GenAI projects has quickly become a whole new beast. We already know how to lead, innovate, and iterate effectively...
Corporate leaders are increasingly realizing the potential of Generative AI (GenAI) as a tool to secure a competitive edge. GenAI’s...