LlamaIndex 🦙 Profile picture
Aug 26 5 tweets 2 min read Twitter logo Read on Twitter
We now have the most comprehensive cookbook on building LLMs with Knowledge Graphs (credits @wey_gu).
✅ Key query techniques: text2cypher, graph RAG
✅ Automated KG construction
✅ vector db RAG vs. KG RAG

Check out the full 1.5 hour tutorial:
Image
The full Colab notebook is here:

There was so much content beyond the live webinar that we recorded a part 2 🔥

We stitched it together in the video.colab.research.google.com/drive/1tLjOg2Z…
To reiterate, there’s a ton of content in here - it basically qualifies as a mini-course 🧑‍🏫

First, we learn the concepts through helpful visual explanations and links.

Learn both about KGs and the traditional RAG stack.
Then, we walk through full code blocks to run through the main aspects of using LLMs during KG construction and querying.

Use @llama_index to help with automated KG construction. Then text-to-cypher and Graph RAG for querying. Image
Finally, we have full application demos and comparisons with traditional vector db RAG approaches.

Did we mention that @wey_gu is incredible? Full credits go to him 🙌 Image

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with LlamaIndex 🦙

LlamaIndex 🦙 Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @llama_index

Aug 10
Introducing “One-click Observability” 🔭

With one line of code, you can now seamlessly integrate @llama_index with rich observability/eval tools offered by our partners (@weights_biases, @arizeai, @truera_ai).

Easily debug/eval your LLM app for prod 💪 https://t.co/tia41IgsT6gpt-index.readthedocs.io/en/latest/end_…
[1] @weights_biases Prompts lets users log/trace/inspect the LlamaIndex execution flow during index construction/querying.

You automatically get traces, and can also choose to version/load indices.

https://t.co/iGDkmxybzggpt-index.readthedocs.io/en/latest/end_…

Image
Image
[2] OpenInference (@arize_ai) is a standard for capturing/storing AI model inferences.

It allows you to experiment/visualize LLM apps using observability tools like @arize_phoenix.

Check out the notebook here! https://t.co/aT9PAP3jGhgpt-index.readthedocs.io/en/latest/exam…
Image
Read 5 tweets
Aug 8
Tip for better RAG systems💡: don’t just store raw text chunks, augment them with structured data.
✅Enables metadata filtering
✅Helps bias embeddings

Here’s a guide on how to use the @huggingface span-marker to extract entities for this exact purpose📕: https://t.co/Gwwoeu3i9Hgpt-index.readthedocs.io/en/latest/exam…
Image
In this example, we parse the 2023 IPPC Climate Report.

After text parsing to break the document into chunks, we use the span-marker extractor to extract relevant entities. Image
These entities can be used as metadata filters (in a vector db) or to help enhance the context embeddings.

In this guide, we do the latter. Adding/embedding the right metadata directly improves the generated answer (left), vs. without (right)
Image
Image
Read 4 tweets
Aug 7
Routing 🚏 is a super simple concept that takes advantage of LLM decision making. Use it in:
⚡️Workflow automation
🔎 Search/retrieval over complex data

We’ve significantly upgraded our router (0.7.20) for retrieval/querying AND added a full guide 📗: https://t.co/Vn3DnCRjpNgpt-index.readthedocs.io/en/latest/core…
Image
Example 1: Using routing to decide between summarization or semantic search.

Given different query engines that will act on different ways over your data, a router module can help decide which one to pick given a question: https://t.co/Z5ZfGODTpKgpt-index.readthedocs.io/en/latest/exam…
Image
Example 2: Using routing to decide between structured data or unstructured data

Given a query, decide whether it makes sense to run a SQL query or if the answer would be better found through semantic search: https://t.co/GOrJuw6djxgpt-index.readthedocs.io/en/latest/exam…
Image
Read 4 tweets
Jul 17
Do you want more reliable LLM agents? Designing a good Tool API is a *crucial* ingredient 💡

Good API design is an important skill in any dev’s toolkit, but it’s especially important for AI/LLM engineers.

We’ve curated some Tool API best practices ✨🧵 medium.com/llamaindex-blo…
Context:

LLM-powered agents now can now “theoretically” interact with arbitrary external services, but there’s a sentiment that a lot of agent implementations can be unreliable:
- might not properly reason about next steps
- Might get stuck in a reasoning loop.
But think about it: if an API interface is hard to understand, then you as the developer will have a hard time making use of that API.

Agents need even more care in being able to understand how to use Tools.
Read 5 tweets
Jul 14
You can give an LLM-powered data agent access to ALL of Google 🔎, Gmail 📥, GCal 📆 with LlamaIndex + LlamaHub.

Easily build a personalized assistant!

Here’s how you can build one to not only find a dentist, but also easily schedule a dentist appt 🦷👇

https://t.co/hKtHAM4SIVcolab.research.google.com/drive/1Br-QPwA…
Step 1: Our Gmail, Google Calendar, and Google Search Tool Specs offer rich API interfaces for agents.

For instance, the Gmail Tool spec allows you to create a draft, update it, and send it.

In total, we give all 9 Tools to the agent to use. Image
Step 2: Wrap each of these with our `LoadAndSearchToolSpec`.

This offers a convenience abstraction that can abstract away the complexity of many of these APIs returning too much data - can overflow context windows.

Our tool helps to cache data in a searchable index.
Read 7 tweets
Jul 13
Stop building API connectors - build data agents that can automatically access to ANY API defined with an OpenAPI spec 🛠️

Use LlamaIndex data agents + indexes to store/retrieve API specs, and use them to call web services! 🌐

Full Colab notebook: https://t.co/MVeLXuBeqRcolab.research.google.com/drive/18aCO8CK…
In the notebook example, we initialize our OpenAPI tool which defines endpoints to load OpenAPI specs, and also a request tool that can make API requests.

Problem: the data returned by OpenAPI specs is too large ⚠️
We have tool abstractions (`LoadAndSearchToolSpec` and `OnDemandLoaderTool`) that can handle indexing/loading data under the hood, allowing agents to plugin to any API service.

Read 4 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us on Twitter!

:(