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

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
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
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
 

Recently uploaded (20)

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
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
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
 

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!