SlideShare a Scribd company logo
1 of 40
Download to read offline
∏
What I learned making Bill
The helpful robot platypus that reads our docs for fun
Plaid
Account Veri
fi
cation & Payments
Fraud & Compliance
Personal Finance Insights
Credit Underwriting
Open Finance
All your Fintech solutions on a single platform
The original hackathon project
How does it work?
Step 1: Chop up your content
Step 2: Figure out the "meaning" of each
Mowing the
lawn
Weeding
Making
dinner
Shoveling
snow
Chains on
tires
Sledding
Skiing
Pool
Beach Hot weather
Cold weather
Fun
Chore
Cross-
country skiing "Embeddings Model"
Step 3: Store all that in a database
-0.0172341652,0.0231553614,0.0176660642,-0.0137998713,,0.0070
0442726,-0.0216646139,-0.00155431416,0.0154508408,-0.0206196
96,0.0172063019,0.00771148782,-0.00135577994,0.0161195882,-0.
1500-dimensional vector
URL
https://plaid.com/docs/signal/add-to-app/
Text
for each institution that Plaid supports. Link makes it secure and easy
for users to connect their bank accounts to Plaid. Note that these
instructions cover Link on the web. For instructions on using Link
within mobile apps, see the Link documentation.Using Link, we will
Title
Signal - Add Signal to your app | Plaid Docs
So, when a user asks a question...
👩💻
Hey, Bill, how do I get
started with Plaid
Transactions?
Ooh! Lemme convert
that question into a
vector!
These documents are
closest to the vector
you just sent me.
User's
question
Vector
Embeddings
API
Vector
database
Vector
database
Now... we can ask our question
Hey, large language
model! Can you answer
this user's question...
...with the help of these
documents?
Sure can!
User's
question
Surprisingly
accurate
answer
GPT-4
A simplified version of the prompt
You are a helpful friendly chatbot that wants developers to be successful when using
the Plaid API. You are given a question and you should answer it if you can.
It's okay to say you don't know if you don't know the answer.
Feel free to include detail when relevant, and include code snippets if appropriate.
Here is some context that might prove useful in answering the user's question:
=========
{all those documents}
=========
The user's question is: "{question}"
Please format your answer in Markdown.
My favorite analogy
"Retrieval Augmented Generation"
(or RAG)
Build vs Buy
Reasons to build Reasons to buy
Less expensive in the long run Faster time to market
Fine control over everything Dedicated engineering teams
Vendor lock-in Less manual maintenance
More integrated experience
You get to learn about LLMs
Build vs Buy
I could build Twitter in a
weekend!
Setting Expectations
Will this replace your docs team?
Hooray! I still
have a job!
...but it can make your docs experience
better
Synthesizing information across different pages
Better search than search
Rephrasing generic docs for a speci
fi
c use case
Will this replace your support team?
Hooray! I still
have a job!
But you can make their lives easier
Help! Our main
account owner left the
company!
This call
failed – can you look
through your logs and
tell us why?
Can you enroll me in
this beta feature?
Something isn’t working as
described in the docs. Help us
locate the problem.
Here's a question
that's already answered
in the documentation
GPT4? You guys rich or something?
Evaluating performance
What about user feedback?
Grade your own homework
Grade your own homework
Here's a typical question
from a user!
👩💻
Got it!
User's
question
Typical
Answer
Grade your own homework
GPT-4
How did this chatbot do,
based on this criteria? Let's say 85
outta 100
👩💻
Typical
Answer
Evaluating performance
But mostly...
70% correct
25% "mostly correct"
5% plain ol' wrong
So... what happens if Bill makes a mistake?
Fix the docs!
So... what happens if Bill makes a mistake?
Maybe hard-code an answer?
How can we make it smarter?
More isn't always better
How can we make it smarter?
Can we change the way we read code?
app.post("/server/create_new_user", async (req, res, next) => {
try {
const username = escape(req.body.username);
const email = escape(req.body.email);
const userId = uuidv4();
const result = await db.run(
`INSERT INTO users(id, username, email) VALUES("${userId}", "${username}", "${email}")`
);
console.log(`User creation result is ${JSON.stringify(result)}`);
if (result["lastID"] != null) {
res.cookie("signedInUser", userId, {
maxAge: 900000,
httpOnly: true,
sameSite: "none",
secure: "false",
});
}
res.json(result);
} catch (error) {
next(error);
}
});
This code is part of a server-side application written in Node.js that interacts with
the Plaid API. It defines three functions: `getLoggedInUserId`, `getUserObject`,
and an anonymous function that handles POST requests to the "/server/
create_new_user" endpoint.
The `getLoggedInUserId` function takes a request object as an argument and
returns the value of the "signedInUser" cookie. This function is used to identify
the user who is currently logged in based on the cookies sent with the HTTP
request.
The `getUserObject` function is an asynchronous function that takes a user ID as
an argument. It queries a database for a user with the given ID and returns the
result. This function is used to retrieve the details of a user from the database.
The anonymous function is a route handler for the "/server/create_new_user"
endpoint. It is an asynchronous function that takes a request and response object,
and a next function for error handling.
When a POST request is made to this endpoint, the function first sanitizes the
How can we make it smarter?
Can we change the way we parse reference docs?
Our normal reference docs...
The way we show them to Bill...
How can we make it smarter?
Probably the bigger problem...
MORTGAGES
ANNUAL
PERCENTAGE
RATES
PAYMENT
DUE DATES
OVERDUE
PAYMENTS
How can we make it smarter?
Probably the bigger problem...
SOME
REFERENCE
DOCS ABOUT A
REST API
Other things to try, maybe...
Change the way we break up text
Try more, smaller chunks
Try fewer, larger chunks
Re
fi
ne how we import text
Try different matching models
What if we try "Three answers from the docs,
3 answers from the reference API?"
Updated embeddings API
What's made the biggest impact?
Using newer models
Having good source material
Security Concerns
Assume that any information you've fed to your chatbot
could be seen verbatim by your customer.
What about jail-breaking?
Oh no! I'm out of time
Go to kerp.blog for topics I didn't have time to discuss
And thank you!

More Related Content

Similar to How I Built Bill, the AI-Powered Chatbot That Reads Our Docs for Fun , by Todd Kerpelman at Plaid

Transforming IT for Digital : Agility for Digital world
Transforming IT for Digital : Agility for Digital worldTransforming IT for Digital : Agility for Digital world
Transforming IT for Digital : Agility for Digital worldEkhlaque Bari
 
CIS14: Authentication: Who are You? You are What You Eat
CIS14: Authentication: Who are You? You are What You EatCIS14: Authentication: Who are You? You are What You Eat
CIS14: Authentication: Who are You? You are What You EatCloudIDSummit
 
CIS14: Authentication: Who are You? You are What You Eat
CIS14: Authentication: Who are You? You are What You EatCIS14: Authentication: Who are You? You are What You Eat
CIS14: Authentication: Who are You? You are What You EatCloudIDSummit
 
Progressive Web Apps by Millicent Convento
Progressive Web Apps by Millicent ConventoProgressive Web Apps by Millicent Convento
Progressive Web Apps by Millicent ConventoDEVCON
 
The Missing Link Between SharePoint and the End User Community
The Missing Link Between SharePoint and the End User CommunityThe Missing Link Between SharePoint and the End User Community
The Missing Link Between SharePoint and the End User CommunityEndUserSharePoint
 
Serverless Evolution during 3 years of Serverless Toronto
Serverless Evolution during 3 years of Serverless TorontoServerless Evolution during 3 years of Serverless Toronto
Serverless Evolution during 3 years of Serverless TorontoDaniel Zivkovic
 
Mozilla Foundation Metrics - presentation to engineers
Mozilla Foundation Metrics - presentation to engineersMozilla Foundation Metrics - presentation to engineers
Mozilla Foundation Metrics - presentation to engineersJohn Schneider
 
Open Web Technologies and You - Durham College Student Integration Presentation
Open Web Technologies and You - Durham College Student Integration PresentationOpen Web Technologies and You - Durham College Student Integration Presentation
Open Web Technologies and You - Durham College Student Integration Presentationdarryl_lehmann
 
Functional requirements: Thinking Like A Pirate
Functional requirements: Thinking Like A PirateFunctional requirements: Thinking Like A Pirate
Functional requirements: Thinking Like A PirateAmye Scavarda
 
Join 2017_Deep Dive_Workflows with Zapier
Join 2017_Deep Dive_Workflows with ZapierJoin 2017_Deep Dive_Workflows with Zapier
Join 2017_Deep Dive_Workflows with ZapierLooker
 
E-COMMERCE WITH RESPECT TO CAMERA & IT’S.pptx
E-COMMERCE WITH RESPECT TO CAMERA & IT’S.pptxE-COMMERCE WITH RESPECT TO CAMERA & IT’S.pptx
E-COMMERCE WITH RESPECT TO CAMERA & IT’S.pptxAbbasSayyed5
 
documentation on bank management system
documentation on bank management systemdocumentation on bank management system
documentation on bank management systemUnsa Jawaid
 
Putting Buyers and Sellers in the Best Light, How Etsy Leverages Big Data for...
Putting Buyers and Sellers in the Best Light, How Etsy Leverages Big Data for...Putting Buyers and Sellers in the Best Light, How Etsy Leverages Big Data for...
Putting Buyers and Sellers in the Best Light, How Etsy Leverages Big Data for...Dana Gardner
 
Essay On Importance Of Reading Habits. Online assignment writing service.
Essay On Importance Of Reading Habits. Online assignment writing service.Essay On Importance Of Reading Habits. Online assignment writing service.
Essay On Importance Of Reading Habits. Online assignment writing service.Diana Jordan
 
2012 03 27_philly_jug_rewrite_static
2012 03 27_philly_jug_rewrite_static2012 03 27_philly_jug_rewrite_static
2012 03 27_philly_jug_rewrite_staticLincoln III
 

Similar to How I Built Bill, the AI-Powered Chatbot That Reads Our Docs for Fun , by Todd Kerpelman at Plaid (20)

Transforming IT for Digital : Agility for Digital world
Transforming IT for Digital : Agility for Digital worldTransforming IT for Digital : Agility for Digital world
Transforming IT for Digital : Agility for Digital world
 
CIS14: Authentication: Who are You? You are What You Eat
CIS14: Authentication: Who are You? You are What You EatCIS14: Authentication: Who are You? You are What You Eat
CIS14: Authentication: Who are You? You are What You Eat
 
CIS14: Authentication: Who are You? You are What You Eat
CIS14: Authentication: Who are You? You are What You EatCIS14: Authentication: Who are You? You are What You Eat
CIS14: Authentication: Who are You? You are What You Eat
 
Ajax learning tutorial
Ajax learning tutorialAjax learning tutorial
Ajax learning tutorial
 
Progressive Web Apps by Millicent Convento
Progressive Web Apps by Millicent ConventoProgressive Web Apps by Millicent Convento
Progressive Web Apps by Millicent Convento
 
Business Law Paper
Business Law PaperBusiness Law Paper
Business Law Paper
 
UX_UI portfolio
UX_UI portfolioUX_UI portfolio
UX_UI portfolio
 
The Missing Link Between SharePoint and the End User Community
The Missing Link Between SharePoint and the End User CommunityThe Missing Link Between SharePoint and the End User Community
The Missing Link Between SharePoint and the End User Community
 
Serverless Evolution during 3 years of Serverless Toronto
Serverless Evolution during 3 years of Serverless TorontoServerless Evolution during 3 years of Serverless Toronto
Serverless Evolution during 3 years of Serverless Toronto
 
Mozilla Foundation Metrics - presentation to engineers
Mozilla Foundation Metrics - presentation to engineersMozilla Foundation Metrics - presentation to engineers
Mozilla Foundation Metrics - presentation to engineers
 
Tweak Geeks #FOS15
Tweak Geeks #FOS15Tweak Geeks #FOS15
Tweak Geeks #FOS15
 
Open Web Technologies and You - Durham College Student Integration Presentation
Open Web Technologies and You - Durham College Student Integration PresentationOpen Web Technologies and You - Durham College Student Integration Presentation
Open Web Technologies and You - Durham College Student Integration Presentation
 
Functional requirements: Thinking Like A Pirate
Functional requirements: Thinking Like A PirateFunctional requirements: Thinking Like A Pirate
Functional requirements: Thinking Like A Pirate
 
Join 2017_Deep Dive_Workflows with Zapier
Join 2017_Deep Dive_Workflows with ZapierJoin 2017_Deep Dive_Workflows with Zapier
Join 2017_Deep Dive_Workflows with Zapier
 
SEO for Large Websites
SEO for Large WebsitesSEO for Large Websites
SEO for Large Websites
 
E-COMMERCE WITH RESPECT TO CAMERA & IT’S.pptx
E-COMMERCE WITH RESPECT TO CAMERA & IT’S.pptxE-COMMERCE WITH RESPECT TO CAMERA & IT’S.pptx
E-COMMERCE WITH RESPECT TO CAMERA & IT’S.pptx
 
documentation on bank management system
documentation on bank management systemdocumentation on bank management system
documentation on bank management system
 
Putting Buyers and Sellers in the Best Light, How Etsy Leverages Big Data for...
Putting Buyers and Sellers in the Best Light, How Etsy Leverages Big Data for...Putting Buyers and Sellers in the Best Light, How Etsy Leverages Big Data for...
Putting Buyers and Sellers in the Best Light, How Etsy Leverages Big Data for...
 
Essay On Importance Of Reading Habits. Online assignment writing service.
Essay On Importance Of Reading Habits. Online assignment writing service.Essay On Importance Of Reading Habits. Online assignment writing service.
Essay On Importance Of Reading Habits. Online assignment writing service.
 
2012 03 27_philly_jug_rewrite_static
2012 03 27_philly_jug_rewrite_static2012 03 27_philly_jug_rewrite_static
2012 03 27_philly_jug_rewrite_static
 

More from Nordic APIs

The Art of API Design, by David Biesack at Apiture
The Art of API Design, by David Biesack at ApitureThe Art of API Design, by David Biesack at Apiture
The Art of API Design, by David Biesack at ApitureNordic APIs
 
ABAC, ReBAC, Zanzibar, ALFA… How Should I Implement AuthZ in My APIs? by Dav...
ABAC, ReBAC, Zanzibar, ALFA…  How Should I Implement AuthZ in My APIs? by Dav...ABAC, ReBAC, Zanzibar, ALFA…  How Should I Implement AuthZ in My APIs? by Dav...
ABAC, ReBAC, Zanzibar, ALFA… How Should I Implement AuthZ in My APIs? by Dav...Nordic APIs
 
Crafting a Cloud Native API Platform to Accelerate Your Platform Maturity - B...
Crafting a Cloud Native API Platform to Accelerate Your Platform Maturity - B...Crafting a Cloud Native API Platform to Accelerate Your Platform Maturity - B...
Crafting a Cloud Native API Platform to Accelerate Your Platform Maturity - B...Nordic APIs
 
The Federated Future: Pioneering Next-Gen Solutions in API Management - Marku...
The Federated Future: Pioneering Next-Gen Solutions in API Management - Marku...The Federated Future: Pioneering Next-Gen Solutions in API Management - Marku...
The Federated Future: Pioneering Next-Gen Solutions in API Management - Marku...Nordic APIs
 
API Authorization Using an Identity Server and Gateway - Aldo Pietropaolo, SGNL
API Authorization Using an Identity Server and Gateway - Aldo Pietropaolo, SGNLAPI Authorization Using an Identity Server and Gateway - Aldo Pietropaolo, SGNL
API Authorization Using an Identity Server and Gateway - Aldo Pietropaolo, SGNLNordic APIs
 
API Discovery from Crawl to Run - Rob Dickinson, Graylog
API Discovery from Crawl to Run - Rob Dickinson, GraylogAPI Discovery from Crawl to Run - Rob Dickinson, Graylog
API Discovery from Crawl to Run - Rob Dickinson, GraylogNordic APIs
 
Productizing and Monetizing APIs - Derric Gilling, Moseif
Productizing and Monetizing APIs - Derric Gilling, MoseifProductizing and Monetizing APIs - Derric Gilling, Moseif
Productizing and Monetizing APIs - Derric Gilling, MoseifNordic APIs
 
Securely Boosting Any Product with Generative AI APIs - Ruben Sitbon, Sipios
Securely Boosting Any Product with Generative AI APIs - Ruben Sitbon, SipiosSecurely Boosting Any Product with Generative AI APIs - Ruben Sitbon, Sipios
Securely Boosting Any Product with Generative AI APIs - Ruben Sitbon, SipiosNordic APIs
 
Security of LLM APIs by Ankita Gupta, Akto.io
Security of LLM APIs by Ankita Gupta, Akto.ioSecurity of LLM APIs by Ankita Gupta, Akto.io
Security of LLM APIs by Ankita Gupta, Akto.ioNordic APIs
 
I'm an API Hacker, Here's How to Go from Making APIs to Breaking Them - Katie...
I'm an API Hacker, Here's How to Go from Making APIs to Breaking Them - Katie...I'm an API Hacker, Here's How to Go from Making APIs to Breaking Them - Katie...
I'm an API Hacker, Here's How to Go from Making APIs to Breaking Them - Katie...Nordic APIs
 
Unleashing the Potential of GraphQL with Streaming Data - Kishore Banala, Net...
Unleashing the Potential of GraphQL with Streaming Data - Kishore Banala, Net...Unleashing the Potential of GraphQL with Streaming Data - Kishore Banala, Net...
Unleashing the Potential of GraphQL with Streaming Data - Kishore Banala, Net...Nordic APIs
 
Reigniting the API Description Wars with TypeSpec and the Next Generation of ...
Reigniting the API Description Wars with TypeSpec and the Next Generation of...Reigniting the API Description Wars with TypeSpec and the Next Generation of...
Reigniting the API Description Wars with TypeSpec and the Next Generation of ...Nordic APIs
 
Establish, Grow, and Mature Your API Platform - James Higginbotham, LaunchAny
Establish, Grow, and Mature Your API Platform - James Higginbotham, LaunchAnyEstablish, Grow, and Mature Your API Platform - James Higginbotham, LaunchAny
Establish, Grow, and Mature Your API Platform - James Higginbotham, LaunchAnyNordic APIs
 
Inclusive, Accessible Tech: Bias-Free Language in Code and Configurations - A...
Inclusive, Accessible Tech: Bias-Free Language in Code and Configurations - A...Inclusive, Accessible Tech: Bias-Free Language in Code and Configurations - A...
Inclusive, Accessible Tech: Bias-Free Language in Code and Configurations - A...Nordic APIs
 
Going Platinum: How to Make a Hit API by Bill Doerrfeld, Nordic APIs
Going Platinum: How to Make a Hit API by Bill Doerrfeld, Nordic APIsGoing Platinum: How to Make a Hit API by Bill Doerrfeld, Nordic APIs
Going Platinum: How to Make a Hit API by Bill Doerrfeld, Nordic APIsNordic APIs
 
Getting Better at Risk Management Using Event Driven Mesh Architecture - Ragh...
Getting Better at Risk Management Using Event Driven Mesh Architecture - Ragh...Getting Better at Risk Management Using Event Driven Mesh Architecture - Ragh...
Getting Better at Risk Management Using Event Driven Mesh Architecture - Ragh...Nordic APIs
 
GenAI: Producing and Consuming APIs by Paul Dumas, Gartner
GenAI: Producing and Consuming APIs by Paul Dumas, GartnerGenAI: Producing and Consuming APIs by Paul Dumas, Gartner
GenAI: Producing and Consuming APIs by Paul Dumas, GartnerNordic APIs
 
The SAS developer portal – developer.sas.com 2.0: How we built it by Joe Furb...
The SAS developer portal –developer.sas.com 2.0: How we built it by Joe Furb...The SAS developer portal –developer.sas.com 2.0: How we built it by Joe Furb...
The SAS developer portal – developer.sas.com 2.0: How we built it by Joe Furb...Nordic APIs
 
How Netflix Uses Data Abstraction to Operate Services at Scale - Vidhya Arvin...
How Netflix Uses Data Abstraction to Operate Services at Scale - Vidhya Arvin...How Netflix Uses Data Abstraction to Operate Services at Scale - Vidhya Arvin...
How Netflix Uses Data Abstraction to Operate Services at Scale - Vidhya Arvin...Nordic APIs
 
cURL to SDK: Navigating the API Adoption Chasm - Sidney Maestre, APIMatic
cURL to SDK: Navigating the API Adoption Chasm - Sidney Maestre, APIMaticcURL to SDK: Navigating the API Adoption Chasm - Sidney Maestre, APIMatic
cURL to SDK: Navigating the API Adoption Chasm - Sidney Maestre, APIMaticNordic APIs
 

More from Nordic APIs (20)

The Art of API Design, by David Biesack at Apiture
The Art of API Design, by David Biesack at ApitureThe Art of API Design, by David Biesack at Apiture
The Art of API Design, by David Biesack at Apiture
 
ABAC, ReBAC, Zanzibar, ALFA… How Should I Implement AuthZ in My APIs? by Dav...
ABAC, ReBAC, Zanzibar, ALFA…  How Should I Implement AuthZ in My APIs? by Dav...ABAC, ReBAC, Zanzibar, ALFA…  How Should I Implement AuthZ in My APIs? by Dav...
ABAC, ReBAC, Zanzibar, ALFA… How Should I Implement AuthZ in My APIs? by Dav...
 
Crafting a Cloud Native API Platform to Accelerate Your Platform Maturity - B...
Crafting a Cloud Native API Platform to Accelerate Your Platform Maturity - B...Crafting a Cloud Native API Platform to Accelerate Your Platform Maturity - B...
Crafting a Cloud Native API Platform to Accelerate Your Platform Maturity - B...
 
The Federated Future: Pioneering Next-Gen Solutions in API Management - Marku...
The Federated Future: Pioneering Next-Gen Solutions in API Management - Marku...The Federated Future: Pioneering Next-Gen Solutions in API Management - Marku...
The Federated Future: Pioneering Next-Gen Solutions in API Management - Marku...
 
API Authorization Using an Identity Server and Gateway - Aldo Pietropaolo, SGNL
API Authorization Using an Identity Server and Gateway - Aldo Pietropaolo, SGNLAPI Authorization Using an Identity Server and Gateway - Aldo Pietropaolo, SGNL
API Authorization Using an Identity Server and Gateway - Aldo Pietropaolo, SGNL
 
API Discovery from Crawl to Run - Rob Dickinson, Graylog
API Discovery from Crawl to Run - Rob Dickinson, GraylogAPI Discovery from Crawl to Run - Rob Dickinson, Graylog
API Discovery from Crawl to Run - Rob Dickinson, Graylog
 
Productizing and Monetizing APIs - Derric Gilling, Moseif
Productizing and Monetizing APIs - Derric Gilling, MoseifProductizing and Monetizing APIs - Derric Gilling, Moseif
Productizing and Monetizing APIs - Derric Gilling, Moseif
 
Securely Boosting Any Product with Generative AI APIs - Ruben Sitbon, Sipios
Securely Boosting Any Product with Generative AI APIs - Ruben Sitbon, SipiosSecurely Boosting Any Product with Generative AI APIs - Ruben Sitbon, Sipios
Securely Boosting Any Product with Generative AI APIs - Ruben Sitbon, Sipios
 
Security of LLM APIs by Ankita Gupta, Akto.io
Security of LLM APIs by Ankita Gupta, Akto.ioSecurity of LLM APIs by Ankita Gupta, Akto.io
Security of LLM APIs by Ankita Gupta, Akto.io
 
I'm an API Hacker, Here's How to Go from Making APIs to Breaking Them - Katie...
I'm an API Hacker, Here's How to Go from Making APIs to Breaking Them - Katie...I'm an API Hacker, Here's How to Go from Making APIs to Breaking Them - Katie...
I'm an API Hacker, Here's How to Go from Making APIs to Breaking Them - Katie...
 
Unleashing the Potential of GraphQL with Streaming Data - Kishore Banala, Net...
Unleashing the Potential of GraphQL with Streaming Data - Kishore Banala, Net...Unleashing the Potential of GraphQL with Streaming Data - Kishore Banala, Net...
Unleashing the Potential of GraphQL with Streaming Data - Kishore Banala, Net...
 
Reigniting the API Description Wars with TypeSpec and the Next Generation of ...
Reigniting the API Description Wars with TypeSpec and the Next Generation of...Reigniting the API Description Wars with TypeSpec and the Next Generation of...
Reigniting the API Description Wars with TypeSpec and the Next Generation of ...
 
Establish, Grow, and Mature Your API Platform - James Higginbotham, LaunchAny
Establish, Grow, and Mature Your API Platform - James Higginbotham, LaunchAnyEstablish, Grow, and Mature Your API Platform - James Higginbotham, LaunchAny
Establish, Grow, and Mature Your API Platform - James Higginbotham, LaunchAny
 
Inclusive, Accessible Tech: Bias-Free Language in Code and Configurations - A...
Inclusive, Accessible Tech: Bias-Free Language in Code and Configurations - A...Inclusive, Accessible Tech: Bias-Free Language in Code and Configurations - A...
Inclusive, Accessible Tech: Bias-Free Language in Code and Configurations - A...
 
Going Platinum: How to Make a Hit API by Bill Doerrfeld, Nordic APIs
Going Platinum: How to Make a Hit API by Bill Doerrfeld, Nordic APIsGoing Platinum: How to Make a Hit API by Bill Doerrfeld, Nordic APIs
Going Platinum: How to Make a Hit API by Bill Doerrfeld, Nordic APIs
 
Getting Better at Risk Management Using Event Driven Mesh Architecture - Ragh...
Getting Better at Risk Management Using Event Driven Mesh Architecture - Ragh...Getting Better at Risk Management Using Event Driven Mesh Architecture - Ragh...
Getting Better at Risk Management Using Event Driven Mesh Architecture - Ragh...
 
GenAI: Producing and Consuming APIs by Paul Dumas, Gartner
GenAI: Producing and Consuming APIs by Paul Dumas, GartnerGenAI: Producing and Consuming APIs by Paul Dumas, Gartner
GenAI: Producing and Consuming APIs by Paul Dumas, Gartner
 
The SAS developer portal – developer.sas.com 2.0: How we built it by Joe Furb...
The SAS developer portal –developer.sas.com 2.0: How we built it by Joe Furb...The SAS developer portal –developer.sas.com 2.0: How we built it by Joe Furb...
The SAS developer portal – developer.sas.com 2.0: How we built it by Joe Furb...
 
How Netflix Uses Data Abstraction to Operate Services at Scale - Vidhya Arvin...
How Netflix Uses Data Abstraction to Operate Services at Scale - Vidhya Arvin...How Netflix Uses Data Abstraction to Operate Services at Scale - Vidhya Arvin...
How Netflix Uses Data Abstraction to Operate Services at Scale - Vidhya Arvin...
 
cURL to SDK: Navigating the API Adoption Chasm - Sidney Maestre, APIMatic
cURL to SDK: Navigating the API Adoption Chasm - Sidney Maestre, APIMaticcURL to SDK: Navigating the API Adoption Chasm - Sidney Maestre, APIMatic
cURL to SDK: Navigating the API Adoption Chasm - Sidney Maestre, APIMatic
 

Recently uploaded

Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsHyundai Motor Group
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfngoud9212
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 

Recently uploaded (20)

Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdf
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 

How I Built Bill, the AI-Powered Chatbot That Reads Our Docs for Fun , by Todd Kerpelman at Plaid

  • 1. ∏ What I learned making Bill The helpful robot platypus that reads our docs for fun
  • 2. Plaid Account Veri fi cation & Payments Fraud & Compliance Personal Finance Insights Credit Underwriting Open Finance All your Fintech solutions on a single platform
  • 3.
  • 5. How does it work?
  • 6. Step 1: Chop up your content
  • 7. Step 2: Figure out the "meaning" of each Mowing the lawn Weeding Making dinner Shoveling snow Chains on tires Sledding Skiing Pool Beach Hot weather Cold weather Fun Chore Cross- country skiing "Embeddings Model"
  • 8. Step 3: Store all that in a database -0.0172341652,0.0231553614,0.0176660642,-0.0137998713,,0.0070 0442726,-0.0216646139,-0.00155431416,0.0154508408,-0.0206196 96,0.0172063019,0.00771148782,-0.00135577994,0.0161195882,-0. 1500-dimensional vector URL https://plaid.com/docs/signal/add-to-app/ Text for each institution that Plaid supports. Link makes it secure and easy for users to connect their bank accounts to Plaid. Note that these instructions cover Link on the web. For instructions on using Link within mobile apps, see the Link documentation.Using Link, we will Title Signal - Add Signal to your app | Plaid Docs
  • 9. So, when a user asks a question... 👩💻 Hey, Bill, how do I get started with Plaid Transactions? Ooh! Lemme convert that question into a vector! These documents are closest to the vector you just sent me. User's question Vector Embeddings API Vector database Vector database
  • 10. Now... we can ask our question Hey, large language model! Can you answer this user's question... ...with the help of these documents? Sure can! User's question Surprisingly accurate answer GPT-4
  • 11. A simplified version of the prompt You are a helpful friendly chatbot that wants developers to be successful when using the Plaid API. You are given a question and you should answer it if you can. It's okay to say you don't know if you don't know the answer. Feel free to include detail when relevant, and include code snippets if appropriate. Here is some context that might prove useful in answering the user's question: ========= {all those documents} ========= The user's question is: "{question}" Please format your answer in Markdown.
  • 12. My favorite analogy "Retrieval Augmented Generation" (or RAG)
  • 13. Build vs Buy Reasons to build Reasons to buy Less expensive in the long run Faster time to market Fine control over everything Dedicated engineering teams Vendor lock-in Less manual maintenance More integrated experience You get to learn about LLMs
  • 14. Build vs Buy I could build Twitter in a weekend!
  • 16. Will this replace your docs team? Hooray! I still have a job!
  • 17. ...but it can make your docs experience better Synthesizing information across different pages Better search than search Rephrasing generic docs for a speci fi c use case
  • 18. Will this replace your support team? Hooray! I still have a job!
  • 19. But you can make their lives easier Help! Our main account owner left the company! This call failed – can you look through your logs and tell us why? Can you enroll me in this beta feature? Something isn’t working as described in the docs. Help us locate the problem. Here's a question that's already answered in the documentation
  • 20. GPT4? You guys rich or something?
  • 22. What about user feedback?
  • 23. Grade your own homework
  • 24. Grade your own homework Here's a typical question from a user! 👩💻 Got it! User's question Typical Answer
  • 25. Grade your own homework GPT-4 How did this chatbot do, based on this criteria? Let's say 85 outta 100 👩💻 Typical Answer
  • 27. But mostly... 70% correct 25% "mostly correct" 5% plain ol' wrong
  • 28. So... what happens if Bill makes a mistake? Fix the docs!
  • 29. So... what happens if Bill makes a mistake? Maybe hard-code an answer?
  • 30. How can we make it smarter? More isn't always better
  • 31. How can we make it smarter? Can we change the way we read code? app.post("/server/create_new_user", async (req, res, next) => { try { const username = escape(req.body.username); const email = escape(req.body.email); const userId = uuidv4(); const result = await db.run( `INSERT INTO users(id, username, email) VALUES("${userId}", "${username}", "${email}")` ); console.log(`User creation result is ${JSON.stringify(result)}`); if (result["lastID"] != null) { res.cookie("signedInUser", userId, { maxAge: 900000, httpOnly: true, sameSite: "none", secure: "false", }); } res.json(result); } catch (error) { next(error); } }); This code is part of a server-side application written in Node.js that interacts with the Plaid API. It defines three functions: `getLoggedInUserId`, `getUserObject`, and an anonymous function that handles POST requests to the "/server/ create_new_user" endpoint. The `getLoggedInUserId` function takes a request object as an argument and returns the value of the "signedInUser" cookie. This function is used to identify the user who is currently logged in based on the cookies sent with the HTTP request. The `getUserObject` function is an asynchronous function that takes a user ID as an argument. It queries a database for a user with the given ID and returns the result. This function is used to retrieve the details of a user from the database. The anonymous function is a route handler for the "/server/create_new_user" endpoint. It is an asynchronous function that takes a request and response object, and a next function for error handling. When a POST request is made to this endpoint, the function first sanitizes the
  • 32. How can we make it smarter? Can we change the way we parse reference docs?
  • 33. Our normal reference docs... The way we show them to Bill...
  • 34. How can we make it smarter? Probably the bigger problem... MORTGAGES ANNUAL PERCENTAGE RATES PAYMENT DUE DATES OVERDUE PAYMENTS
  • 35. How can we make it smarter? Probably the bigger problem... SOME REFERENCE DOCS ABOUT A REST API
  • 36. Other things to try, maybe... Change the way we break up text Try more, smaller chunks Try fewer, larger chunks Re fi ne how we import text Try different matching models What if we try "Three answers from the docs, 3 answers from the reference API?" Updated embeddings API
  • 37. What's made the biggest impact? Using newer models Having good source material
  • 38. Security Concerns Assume that any information you've fed to your chatbot could be seen verbatim by your customer.
  • 40. Oh no! I'm out of time Go to kerp.blog for topics I didn't have time to discuss And thank you!