Empowering Nx with AI

Rate this content
Bookmark

In this enlightening session, we'll unveil the pioneering integration of AI and ML within the Nx ecosystem. Discover how our cloud services are enhanced with intelligent algorithms to optimize performance and efficiency. We'll also take a peek into the Nx AI Assistant, our innovative tool designed to streamline navigation and utilization of Nx documentation. 

This talk has been presented at React Summit 2024, check out the latest edition of this React Conference.

FAQ

Katerina Skrimpelou is a senior engineer at NX, a Google developer expert for Angular and Google Maps, a Women Techmakers ambassador, and a speaker and instructor.

NX is a powerful build system with a rich set of tools designed to enhance developer productivity, optimize CI performance, and maintain code quality.

NX offers features such as smart project graph analysis, advanced dependency management, NX Replay (cache), NX Agents, NX Atomizer (breaks test suites into individual files), and automatic flaking detection.

You can add NX to your React project by running the command 'npx nx init'.

NX offers three AI features: the NX Docs AI Assistant, the NX AI Error Explainer for CI logs, and a draft solution for Resource Allocation Optimization on NX Cloud.

The NX Docs AI Assistant is designed to streamline navigation and utilization of NX documentation by providing accurate answers and allowing complex, context-aware queries.

The NX AI Error Explainer analyzes and explains errors within CI logs, providing actionable feedback to help developers quickly resolve issues. It uses OpenAI GPT-4 and Vercel's AI SDK.

The tools used include OpenAI, GPT-4, Superbase, Vercel's AI SDK, and the AI React package.

The Resource Allocation Optimization feature uses machine learning to optimize the allocation of CI agents, helping to find the optimal number of agents to save time or money. It is currently in development.

You can find more information about NX and its AI features at NX Dev Tools on Twitter, nx.dev, nx.app, and monorepo.tools. You can also try out the AI Assistant at nx.dev/ai-chat.

Katerina Skroumpelou
Katerina Skroumpelou
8 min
18 Jun, 2024

Comments

Sign in or register to post your comment.

Video Summary and Transcription

Today's Talk discusses empowering NX with AI and building an AI-powered documentation system. NX is a powerful build system with smart features like project graph analysis and dependency management. The AI features include an assistant for streamlined navigation of documentation, AI error explainer, and resource allocation optimization on NX Cloud. The AI-powered documentation system uses embeddings and vector matching to find relevant Docs, utilizing tools like OpenAI, GPT, Superbase, and Vercel's AI SDK.
Available in Español: Potenciando Nx con IA

1. Empowering NX with AI

Short description:

Today, we're going to talk about empowering NX with the help of AI. NX is a powerful build system with features like smart project graph analysis, advanced dependency management, and automatically flaking. We also have three AI features: the NX Docs AI Assistant, NX AI Error Explainer, and Resource Allocation Optimization on NX Cloud. The NX Docs AI Assistant streamlines navigation and utilization of documentation, providing accurate answers and enhancing user experience. AI for Docs overcomes challenges in search and retrieval, offering personalized and contextual search. Users benefit from enhanced user experience, expanded documentation retrieval, and the ability to mix and combine different parts of the documentation.

Hi, everyone. I'm Katerina Skrimpelou, and I'm from NX. Today, we're going to talk about empowering NX with the help of AI. I'm a senior engineer at NX. I'm a Google developer expert for Angular and Google Maps. I'm also a Women Techmakers ambassador, a speaker and instructor, and I really, really love cats, mountains, oatmeal, and chocolate. You can follow me at cybercity or cyber.city.

So, AI, sure, but what? NX is already smart, no? Well, first, for those who don't know, let's see a brief intro to NX. By the way, this is my cat, Malone, and he loves his pineapple hat. So, what is NX? NX is a powerful build system with a rich set of tools, making it easier to manage and scale projects. It enhances developer productivity, optimizes CI performance, and maintains code quality. With NX, you get features like smart project graph analysis, advanced dependency management, and much more. Some of our most notable features are the NX Replay, which is our cache, our NX Agents, the NX Atomizer, which breaks your test suites into individual files, which is better for granular results and rerunning. We also have automatically flaking, which detects flaky tasks and reruns them automatically, and much, much more. And you can find all these at our NX Cloud solution. You can add NX right now to your project, yes, to your React projects, by running npx nx init.

So, where does AI come into play then? Well, we have, at the moment, three AI features that I'm going to talk about. The NX Docs AI Assistant, the NX AI Error Explainer for the logs that you can see on NX Cloud, and a draft solution, the Resource Allocation Optimization on NX Cloud. So, the NX Docs AI Assistant is designed to streamline the navigation and utilization of NX documentation. By leveraging AI, the Assistant provides users with accurate answers for the NX Docs, making it easier to find relevant information quickly. And the Assistant enhances user experience by allowing complex, context-aware queries and providing intelligent, coherent responses. Why use AI for Docs, though? As I said, there are some challenges that search and retrieval of Docs poses. The volume and density of documentation, you are limited by static keyword matching, and your users need personalized and contextual search that maybe Algolio or some other search engine cannot offer in that way. In such a way. Potential benefits for the user is a user can go beyond simple queries, as you already know, since we're all GPT users for almost one and a half years now. You get feedback loops, follow-up questions on things you've already asked. You can mix and combine different parts of the documentation into one. You can get your personalized blog post, if you want, right? You get enhanced user experience and expanded documentation retrieval. Because sometimes vector search is very efficient, right? Potential benefits for us, the authors, we can identify what users are looking for, like, what questions they need answered, and we can add more Docs accordingly. We can identify potentially unclear parts of documentation, if the AI consistently gives bad answers to similar questions.

2. Building the AI-powered documentation system

Short description:

To build the AI-powered documentation system, we create embeddings for each section, store them on Superbase, and use vector matching to find relevant Docs. The tools we use are OpenAI, GPT, Superbase, and Vercel's AI SDK.

And more parts of the documentation may become more accessible through the links and sources provided. How do we build it? The steps are simple. You create embeddings for each section of the documentation. You store the embeddings on a database. We're using Superbase. The user asks a question. We create an embedding for that question, and then we do vector matching to find Docs similar to the question. We get back the relevant Docs. We combine them with the query of the user and a prompt, and send to GPT, get back answers from GPT. The tools that we're using, OpenAI, GPT, Superbase, and Vercells AI SDK. The AI slash React package is very, very helpful and powerful in building such applications, because it provides functions, like, that can really help with the streaming response or access the APIs and the endpoints that you have. I totally recommend it, if you're not using it already, which I assume maybe you already are.

Check out more articles and videos

We constantly think of articles and videos that might spark Git people interest / skill us up or help building a stellar career

Building a Voice-Enabled AI Assistant With Javascript
JSNation 2023JSNation 2023
21 min
Building a Voice-Enabled AI Assistant With Javascript
Top Content
This Talk discusses building a voice-activated AI assistant using web APIs and JavaScript. It covers using the Web Speech API for speech recognition and the speech synthesis API for text to speech. The speaker demonstrates how to communicate with the Open AI API and handle the response. The Talk also explores enabling speech recognition and addressing the user. The speaker concludes by mentioning the possibility of creating a product out of the project and using Tauri for native desktop-like experiences.
AI and Web Development: Hype or Reality
JSNation 2023JSNation 2023
24 min
AI and Web Development: Hype or Reality
Top Content
This talk explores the use of AI in web development, including tools like GitHub Copilot and Fig for CLI commands. AI can generate boilerplate code, provide context-aware solutions, and generate dummy data. It can also assist with CSS selectors and regexes, and be integrated into applications. AI is used to enhance the podcast experience by transcribing episodes and providing JSON data. The talk also discusses formatting AI output, crafting requests, and analyzing embeddings for similarity.
The Rise of the AI Engineer
React Summit US 2023React Summit US 2023
30 min
The Rise of the AI Engineer
Watch video: The Rise of the AI Engineer
The rise of AI engineers is driven by the demand for AI and the emergence of ML research and engineering organizations. Start-ups are leveraging AI through APIs, resulting in a time-to-market advantage. The future of AI engineering holds promising results, with a focus on AI UX and the role of AI agents. Equity in AI and the central problems of AI engineering require collective efforts to address. The day-to-day life of an AI engineer involves working on products or infrastructure and dealing with specialties and tools specific to the field.
Web Apps of the Future With Web AI
JSNation 2024JSNation 2024
32 min
Web Apps of the Future With Web AI
Web AI in JavaScript allows for running machine learning models client-side in a web browser, offering advantages such as privacy, offline capabilities, low latency, and cost savings. Various AI models can be used for tasks like background blur, text toxicity detection, 3D data extraction, face mesh recognition, hand tracking, pose detection, and body segmentation. JavaScript libraries like MediaPipe LLM inference API and Visual Blocks facilitate the use of AI models. Web AI is in its early stages but has the potential to revolutionize web experiences and improve accessibility.
Building the AI for Athena Crisis
JS GameDev Summit 2023JS GameDev Summit 2023
37 min
Building the AI for Athena Crisis
Join Christoph from Nakazawa Tech in building the AI for Athena Crisis, a game where the AI performs actions just like a player. Learn about the importance of abstractions, primitives, and search algorithms in building an AI for a video game. Explore the architecture of Athena Crisis, which uses immutable persistent data structures and optimistic updates. Discover how to implement AI behaviors and create a class for the AI. Find out how to analyze units, assign weights, and prioritize actions based on the game state. Consider the next steps in building the AI and explore the possibility of building an AI for a real-time strategy game.
Code coverage with AI
TestJS Summit 2023TestJS Summit 2023
8 min
Code coverage with AI
Codium is a generative AI assistant for software development that offers code explanation, test generation, and collaboration features. It can generate tests for a GraphQL API in VS Code, improve code coverage, and even document tests. Codium allows analyzing specific code lines, generating tests based on existing ones, and answering code-related questions. It can also provide suggestions for code improvement, help with code refactoring, and assist with writing commit messages.

Workshops on related topic

AI on Demand: Serverless AI
DevOps.js Conf 2024DevOps.js Conf 2024
163 min
AI on Demand: Serverless AI
Top Content
Featured WorkshopFree
Nathan Disidore
Nathan Disidore
In this workshop, we discuss the merits of serverless architecture and how it can be applied to the AI space. We'll explore options around building serverless RAG applications for a more lambda-esque approach to AI. Next, we'll get hands on and build a sample CRUD app that allows you to store information and query it using an LLM with Workers AI, Vectorize, D1, and Cloudflare Workers.
Leveraging LLMs to Build Intuitive AI Experiences With JavaScript
JSNation 2024JSNation 2024
108 min
Leveraging LLMs to Build Intuitive AI Experiences With JavaScript
Featured Workshop
Roy Derks
Shivay Lamba
2 authors
Today every developer is using LLMs in different forms and shapes, from ChatGPT to code assistants like GitHub CoPilot. Following this, lots of products have introduced embedded AI capabilities, and in this workshop we will make LLMs understandable for web developers. And we'll get into coding your own AI-driven application. No prior experience in working with LLMs or machine learning is needed. Instead, we'll use web technologies such as JavaScript, React which you already know and love while also learning about some new libraries like OpenAI, Transformers.js
Llms Workshop: What They Are and How to Leverage Them
React Summit 2024React Summit 2024
66 min
Llms Workshop: What They Are and How to Leverage Them
Featured Workshop
Nathan Marrs
Haris Rozajac
2 authors
Join Nathan in this hands-on session where you will first learn at a high level what large language models (LLMs) are and how they work. Then dive into an interactive coding exercise where you will implement LLM functionality into a basic example application. During this exercise you will get a feel for key skills for working with LLMs in your own applications such as prompt engineering and exposure to OpenAI's API.
After this session you will have insights around what LLMs are and how they can practically be used to improve your own applications.
Table of contents: - Interactive demo implementing basic LLM powered features in a demo app- Discuss how to decide where to leverage LLMs in a product- Lessons learned around integrating with OpenAI / overview of OpenAI API- Best practices for prompt engineering- Common challenges specific to React (state management :D / good UX practices)
Working With OpenAI and Prompt Engineering for React Developers
React Advanced Conference 2023React Advanced Conference 2023
98 min
Working With OpenAI and Prompt Engineering for React Developers
Top Content
Workshop
Richard Moss
Richard Moss
In this workshop we'll take a tour of applied AI from the perspective of front end developers, zooming in on the emerging best practices when it comes to working with LLMs to build great products. This workshop is based on learnings from working with the OpenAI API from its debut last November to build out a working MVP which became PowerModeAI (A customer facing ideation and slide creation tool).
In the workshop they'll be a mix of presentation and hands on exercises to cover topics including:
- GPT fundamentals- Pitfalls of LLMs- Prompt engineering best practices and techniques- Using the playground effectively- Installing and configuring the OpenAI SDK- Approaches to working with the API and prompt management- Implementing the API to build an AI powered customer facing application- Fine tuning and embeddings- Emerging best practice on LLMOps
Building AI Applications for the Web
React Day Berlin 2023React Day Berlin 2023
98 min
Building AI Applications for the Web
Workshop
Roy Derks
Roy Derks
Today every developer is using LLMs in different forms and shapes. Lots of products have introduced embedded AI capabilities, and in this workshop you’ll learn how to build your own AI application. No experience in building LLMs or machine learning is needed. Instead, we’ll use web technologies such as JavaScript, React and GraphQL which you already know and love.
Building Your Generative AI Application
React Summit 2024React Summit 2024
82 min
Building Your Generative AI Application
WorkshopFree
Dieter Flick
Dieter Flick
Generative AI is exciting tech enthusiasts and businesses with its vast potential. In this session, we will introduce Retrieval Augmented Generation (RAG), a framework that provides context to Large Language Models (LLMs) without retraining them. We will guide you step-by-step in building your own RAG app, culminating in a fully functional chatbot.
Key Concepts: Generative AI, Retrieval Augmented Generation
Technologies: OpenAI, LangChain, AstraDB Vector Store, Streamlit, Langflow