DEV Community

Cover image for I'm Building an AI Project: Here Are the Libraries I'm Going to Use...
uliyahoo Subscriber for CopilotKit

Posted on β€’ Edited on

I'm Building an AI Project: Here Are the Libraries I'm Going to Use...

With the right libraries any developer can build powerful AI features into their applications (like a Ninja πŸ₯·).

In this list, I've compiled 7 awesome AI libraries you can use to (relatively) easily ship features today.

Don't forget to star these libraries to show them your support.

Star ⭐️


1. CopilotPortal: Build an app-native AI chatbot

In-app AI chatbot assistant that can 'see' your current app state and take actions in the frontend and backend.

A set of fully customizable react components & hooks and the architecture for establishing the interaction between the LLM and your app.

Define useMakeCopilotReadable, useMakeCopilotActionable, and CopilotSidebarUIProvider to get it running.

import "@copilotkit/react-ui/styles.css";
import { CopilotProvider } from "@copilotkit/react-core";
import { CopilotSidebarUIProvider } from "@copilotkit/react-ui";

export default function App(): JSX.Element {
  return (
  <CopilotProvider chatApiEndpoint="/api/copilotkit/chat">
      <CopilotSidebarUIProvider>

        <YourContent />

      </CopilotSidebarUIProvider>
    </CopilotProvider>
  );
}
Enter fullscreen mode Exit fullscreen mode

Star CopilotPortal ⭐️


2. RAGxplorer - Visualise and explore your RAG documents

RAGxplorer is a Python tool for visualizing RAG (Retrieval-Augmented Generation) documents in machine learning and natural language processing.

Interactively explore the connections and content within docs used in your RAG process.

To set up RAGxplorer, define your RAG checkpoint path in the code and install the specified dependencies.

import streamlit as st
from utils.rag import build_vector_database

st.set_page_config(page_title="RAGxplorer", page_icon="πŸ”")
uploaded_file = st.file_uploader("Upload your PDF", type='pdf')
query = st.text_input("Enter your query")
search = st.button("Search")
top_k = st.number_input("Number of Chunks", value=5, min_value=1)
st.session_state["chroma"] = build_vector_database(uploaded_file, ...)
st.session_state['retrieved_id'] = query_chroma(...)
plot_embeddings(...)

Enter fullscreen mode Exit fullscreen mode

Star RAGxplorer ⭐️


3. Tavily GPT Researcher - Get an LLM to Search the Web & Databases

Tavily enables you to add GPT-powered research and content generation tools to your React applications, enhancing their data processing and content creation capabilities.

# Create an assistant
assistant = client.beta.assistants.create(
    instructions=assistant_prompt_instruction,
    model="gpt-4-1106-preview",
    tools=[{
        "type": "function",
        "function": {
            "name": "tavily_search",
            "description": "Get information on recent events from the web.",
            "parameters": {
                "type": "object",
                "properties": {
                    "query": {"type": "string", "description": "The search query to use. For example: 'Latest news on Nvidia stock performance'"},
                },
                "required": ["query"]
            }
        }
    }]
)
Enter fullscreen mode Exit fullscreen mode

Star Tavily ⭐️


4. Pezzo.ai - Developer first LLMOps platform

Centralized platform for managing your OpenAI calls.

Optimize your prompts & token use. Keep track of your AI use.

Free & easy to integrate.

const prompt = await pezzo.getPrompt("AnalyzeSentiment");
const response = await openai.chat.completions.create(prompt);
Enter fullscreen mode Exit fullscreen mode

Star Pezzo ⭐️


5. DeepEval - Evaluate LLM, RAG & Fine-Tuning Performance

DeepEval is an open-source framework that simplifies the evaluation of LLMs by treating evaluations as unit tests.

It provides various metrics to assess LLM outputs, and its modular design allows developers to customize their evaluation pipelines

To use it, you install the library, write test cases, and run these to evaluate your LLM's performance.

Pytest Integration: 

from deepeval import assert_test
from deepeval.metrics import HallucinationMetric
from deepeval.test_case import LLMTestCase

test_case = LLMTestCase(
 input="How many evaluation metrics does DeepEval offers?",
 actual_output="14+ evaluation metrics",
 context=["DeepEval offers 14+ evaluation metrics"]
)
metric = HallucinationMetric(minimum_score=0.7)

def test_hallucination():
  assert_test(test_case, [metric])
Enter fullscreen mode Exit fullscreen mode

Star DeepEval ⭐️


6. CopilotTextarea - AI-powered Writing in React Apps

A drop-in replacement for any react <textarea> with the features of Github CopilotX.

Autocompletes, insertions, edits.

Can be fed any context in real time or by the developer ahead of time.

import { CopilotTextarea } from "@copilotkit/react-textarea";
import { CopilotProvider } from "@copilotkit/react-core";


// Provide context...
useMakeCopilotReadable(...)

// in your component...
<CopilotProvider>
    <CopilotTextarea/>
</CopilotProvider>`
Enter fullscreen mode Exit fullscreen mode

Star CopilotTextarea ⭐️


7.SwirlSearch - AI powered search.

Swirl Search is an open-source platform that uses AI to search multiple data sources simultaneously and to provide drafted reports on them.

It can search across various sources, including search engines, databases, and cloud services, and is designed to be set up easily by following the installation instructions provided in the repository.

Swirl Search is built on the Python/Django stack, released under the Apache 2.0 license, and is available as a Docker image, making it accessible and customizable for users.

Star SwirlSearch ⭐️


Thanks for reading! Don't forget to bookmark the article, give your reactions, and to support and checkout the awesome libraries mentioned.

Cheers!

Top comments (16)

Collapse
Β 
matijasos profile image
Matija Sosic β€’ β€’ Edited

Interesting! What are you going to use for starting your app? A freeboilerplate starter for React/Node like opensaas.sh/ (disclaimer: I made it) might be helpful :)

Collapse
Β 
uliyahoo profile image
uliyahoo CopilotKit β€’

opensaas.sh is a perfect complimentary to these tools!

Collapse
Β 
guybuildingai profile image
Jeffrey Ip β€’

Thanks for the deepeval mention :)

Collapse
Β 
debadyuti profile image
Deb β€’

Looking forward to the project you build with these libraries.

Collapse
Β 
uliyahoo profile image
uliyahoo CopilotKit β€’

Thanks! Follow my account to see my future tutorials with these libraries.

dev.to/copilotkit/how-to-build-the...

Collapse
Β 
jeremiah_the_dev_man profile image
Jeremiah β€’

Cool, thanks for sharing! I've seen some of these before, but haven't had the chance to check them out yet.

Maybe this weekend

Collapse
Β 
nevodavid profile image
Nevo David CopilotKit β€’

Sounds like great repositories for the next AI project.

Collapse
Β 
uliyahoo profile image
uliyahoo CopilotKit β€’

Tried to include some of the best libraries out there.

Collapse
Β 
morganney profile image
Morgan Ney β€’

Great, we can all talk like Copilot bots now.

Collapse
Β 
ricardogesteves profile image
Ricardo Esteves β€’

Cool, Looks good!
what kind of application are you building?

Collapse
Β 
uliyahoo profile image
uliyahoo CopilotKit β€’

You can look at my previous post to see a preview of the types of apps I build.

Working on something cool now :)
dev.to/copilotkit/how-to-build-the...

Collapse
Β 
ricardogesteves profile image
Ricardo Esteves β€’

Ho, I saw that one.
cool, cool, cool!

Collapse
Β 
ricardogesteves profile image
Ricardo Esteves β€’

Sure, will check it out. πŸ‘Œ

Collapse
Β 
fernandezbaptiste profile image
Bap β€’

Let us know when the project is done - excited to see what it will look like :)

Collapse
Β 
srbhr profile image
πš‚πšŠπšžπš›πšŠπš‹πš‘ πšπšŠπš’ β€’

Awesome, @uliyahoo! I wish you much success with your AI Project. These are just the libraries that you'll require to complete your project.

Collapse
Β 
andylarkin677 profile image
Andy Larkin β€’

AI is a very cool tool, but it also has disadvantages, it seems to me that people will stop thinking and develop thinking