Re

Retrieval Augmented Generation for LLMs from APIs with Function Calling

Hacker News

Retrieval Augmented Generation for LLMs from APIs with Function Calling

Dear HN, we'd love your feedback on a different approach to Retrieval Augmented Generation (RAG) for LLMs that uses function calling to retrieve the most relevant data from APIs. It aims to solve the problem of connecting LLMs with your data so that the LLM can pull in the context it needs to provide high quality answers to user questions. We are calling it "apiRAG" for now (yes, very creative ;-) You can run the examples in the GitHub repository or watch this video to see how it works: https://www.youtube.com/watch?v=Mx-slh6h42c We developed apiRAG because we found that existing RAG approaches (text search, vector based, FLARE, etc) don't work well with structured and semi-structured data. apiRAG can efficiently augment from structured and semi-structured data by translating user questions to relevant API requests and then presenting the result data to the user. It supports textual presentation (with Markdown for tables and such) and visual presentation by charting data when appropriate. Check out the IoT chatbot that can answer questions about collected sensor data or the credit card example that gives users a customized spending analysis (shown in the video). Unlike RAG approaches that use text or vector search, apiRAG uses the LLM to determine what information should be retrieved and augmented into the context via function calling. That means, it often does a better job at identifying relevant information by pushing down filters, like when you ask "Who appears in the third episode of season 2" in our "Rick and Morty" example. apiRAG also works great for customer sensitive data, like in our Nutshop and banking examples where customers can ask questions about their past purchases/transactions and the LLM can answers those effectively by pulling in the relevant data from the API while being "sandboxed" to only access a particular authenticated customer's data. Most importantly, apiRAG is really simple. Just a lightweight library configured with a single JSON file that specifies the API endpoints (you can reuse existing APIs). All the heavy lifting is done by the LLM. Let us know what you think of apiRAG and if you'd find it useful for building generative AI applications. How could we make it better?

Share card

Actual performance

3points
Did not reach leaderboard

Launch Intel predictions

Analyze your own launch →
Product HuntOn track for Day 1 leaderboard · Strong signals: user, context, visual · Missing: mac, agents, macos
96%96% predicted probability of success on Product Hunt, based on ML models trained on real launch data.
best fitHighest predicted score across all platforms for this description.
Indie HackersFits the IH revenue-focused audience · Strong signals: supports, efficiently · Missing: reddit linkedin, podcasting, created
80%80% predicted probability of success on Indie Hackers, based on ML models trained on real launch data.
Hacker NewsStrong engagement from HN community · Strong signals: exist, existing, ide · Missing: https docs, excited, just released
68%68% predicted probability of success on Hacker News, based on ML models trained on real launch data.
nativeThis product was originally launched on this platform.
AppSumoMay struggle as an AppSumo deal · Strong signals: efficient, users · Missing: plus, platform, intuitive
50%50% predicted probability of success on AppSumo, based on ML models trained on real launch data.
TrustMRRLess likely to generate early MRR · Strong signals: video, answers, users · Missing: mobile apps, ios, personal
46%46% predicted probability of success on TrustMRR, based on ML models trained on real launch data.
Acquire.comPre-revenue stage for this audience · Missing: arr, mrr, revenue
12%12% predicted probability of success on Acquire.com, based on ML models trained on real launch data.
BetaListMay not resonate with beta-testers · Strong signals: chat · Missing: web3, crypto, cryptocurrency
0%0% predicted probability of success on BetaList, based on ML models trained on real launch data.

Incorrect prediction on native model

Similar products

ty
typerassistant – turn any Typer app in to a function-calling assistant45%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

typerassistant – turn any Typer app in to a function-calling assistant

Hacker News1
Fu
Function calling on Claude 2 and Cohere with good DX powered by Cursive39%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Function calling on Claude 2 and Cohere with good DX powered by Cursive

Hacker News1
Pl
Playground for OpenAI Function Calling50%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Playground for OpenAI Function Calling

Hacker News5
Pl
Playground for OpenAI Function Calling62%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Playground for OpenAI Function Calling

Hacker News51
LL
LLM Toolkit – automatic function calling schema generation47%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

LLM Toolkit – automatic function calling schema generation

Hacker News1
Se
Serverless GPT Function Calling50%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Serverless GPT Function Calling

Hacker News2
Ea
Easily generate OpenAI function calling schemas from classes in Java34%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Easily generate OpenAI function calling schemas from classes in Java

Hacker News2
Te
TensorFlowithInception as an OpenFaaS function34%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

TensorFlowithInception as an OpenFaaS function

Hacker News4
Te
TensorFlow ImageNet/Inception as an OpenFaaS function48%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

TensorFlow ImageNet/Inception as an OpenFaaS function

Hacker News4
We
Weighted Scoring Function for CodersBracket32%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Weighted Scoring Function for CodersBracket

Hacker News1