Build a Customer Assistant AI with Multi-Domain RAG, n8n & Pinecone

In this live code‑along session, Richie Cotton moderates a demo on constructing a customer‑assistant AI for vacation‑rental properties without writing code. Participants set up an n8n workspace, a Pinecone account, and an LLM API key (OpenAI or Anthropic). The workflow ingests property‑specific markdown documents, automatically chunks and embeds them via Pinecone Assistants (which bundle file storage, chunking, embedding, vector search, and optional re‑ranking). Three separate assistants are created—one per property (Birchwood, Hillcrest, Lakeside)—to keep context isolated. An n8n AI Agent node orchestrates the chat: it determines the relevant property from the user query, calls the appropriate Pinecone Assistant as a tool to retrieve relevant snippets, and feeds those snippets to the LLM to generate a precise answer. The session covers workflow construction (installing nodes, configuring credentials, uploading files, routing logic), discusses RAG fundamentals, compares vector‑search to traditional keyword search, explains scaling considerations (managing many assistants via API/CLI, grouping by domain), and addresses operational concerns such as indexing, chunk size heuristics, routing accuracy, and orchestration challenges. Audience Q&A touches on the necessity of RAG versus web search, indexing automation, and common failure points. The demo demonstrates a functional, no‑code RAG‑in‑a‑box solution that can be extended to larger, multi‑tenant use cases.
Chapters
Hello everyone and welcome to today's session. My name is Rhys and I'll be your moderator for today. Today we are just about to get started in a couple of minutes. We're just waiting so everyone has a chance to join. If you haven't checked the chat or the video description already, then you may not know that there is some setup required for today's session. You will have got that as an email reminder as well. But if you do want to join in with us live, you've got a few minutes now to get the setup sorted. For the setup today, you, you are going to need, uh, an NAN workspace, uh, whether that's NAN Cloud or self-hosted, either is fine. You're gonna need a free Pinecone account and you're gonna need an OpenAI API, uh, key with $5 in credits loaded. Uh, an Anthropic API key will also work as well. Uh, there is a link to the NAN workflow that we're going to be, uh, working through. so please check that out. And also if you want to get any help after the session, there is also a link to the Pinecone Discord as well. You can find all of this information in the, uh, session resources that's pinned in the chat, but it's also in the video description as well. So yeah, check both of those places a little bit, probably a little bit easier to read in the video description, but also just check the resources document out. That's the pinned link in the chat. So yeah, if you do wanna join in live, please check out those bits. The setup won't take you too long and yeah, you've got some time now to get it sorted, but hopefully you've done it already. So yeah, for anyone new, thank you for joining today's session. Uh, we are just about to get started in about a minute or so. We are just waiting so everyone has a chance to join before we get started. Uh, if you haven't seen already, there is a little bit of setup required for today's session. Everything you need in terms of setup is described in the video description and in the session resources that is pinned in the chat. So yeah, please check those out. And yeah, if you have any more questions, let us know in the chat and we'll get back to you. What you need for today's session is an N8N workspace, a Pinecone account, an OpenAI API key with $5 in credits loaded, and a link to the workflow that we're going to be working through today. And then if you need any extra help, there's also a link to the Pinecone Discord as well. Where you can follow up with our guests today. So yeah, if you want to join in, please do check those bits out. However, if you would just like to watch along and then catch up with the recording, make sure you register for this session. You can scan the QR code that's on screen now. I'll also post a link so that you can register as well. I'll post that in the chat very shortly. I'll also change— I'll put a link in so you can check out the other events that we've got in this series coming up. Next event is tomorrow. We've got another one on Friday and many more next week as well. Please do check those out as well. I'll be posting a link to that shortly. But yeah, if you want to join in today, check the video description, check the session resources, uh, the steps you need to, uh, to follow to set up are in there. And with that, I'll hand over to Richie. Um, Richie, please take it away.
Hi there, Data Scamps and Data Jumps. This is Richie. So welcome back to the Agents in the Enterprise series. Uh, looking forward to this. And for those of you who missed Monday's session, uh, we had a great thing around building stuff with OpenClaw. Please do check out the recording of that. And yeah, as Reece mentioned, plenty more sessions to come. But that's all in the future. Today, got a very exciting session around building an agent without making use of code. So today we're gonna build a customer assistant AI since helping your customers is usually a good idea. And to do this, we're gonna be making use of 3 technologies. So first up, we are using Na10. It's a no-code AI platform for automation. Next up, we've got Pinecone, expect a database. And top of these, you need an LLM. So we're gonna be defaulting to GPT, although if you've got tokens for something else, then that might also work. We've got two fantastic guests for you, both of them from the developer relations team at Pinecone. First up, we have Jenna Pedersen, who's a staff developer advocate. Welcome, Jenna. Great to have you here.
Hello. Thank you for having me.
Yeah, I'm looking forward to this. So Jen's a software engineer turned developer advocate. She's got a couple of decades of experience in technology development and education. Before her time at Pinecone, she was principal developer advocate at AWS, and she's also a former business owner and leader of several Minnesota tech communities. So yeah, I like that you got the community vibes going on there. Well, wonderful. Next up we have Roy Schwaber Cohen, who is Head of Developer Relations. Welcome, Roy.
Hey, hey.
In fact, should I say welcome back? Because this is not your first Code Along.
Not my first Code Along, yeah.
By a long shot, I guess, in general. Wonderful. Yeah, so Roy runs Pinecon's team of developer advocates. Again, he's got a couple of decades experience in both software development and architecture. His specialization is big data and AI. And a lot of his work involves bridging the gap between Python and the TypeScript and JavaScript worlds in the field of AI. So yeah, quite different fields, I think, but gradually coming together. Yeah, cool. All right. So between the two of you, I'll let you get started. Please take it away.
Okay.
Thanks, Richie.
Yeah. Hello, everyone. Thanks for being here. So we're going to, like Richie mentioned, we're going to work through an N8n workflow. Specific use case, a little bit more specific than a customer assistant AI use case. But I'll share a little bit about that in a few minutes. But I wanna start with getting maybe let's in chat, like let's get a share of hands of like how many people know what Retrieval Augmented Generation is, RAG. I'm gonna do a little bit of an overview, but I would kind of wanna understand where we're sitting. You can just raise your hand. You can— yeah, that's fine. The wait is fine. Raise your hand in chat. You can just say yes or no, and we'll work— we'll talk through it a little bit here too. So, and let me get this going. So just to level set, make sure everybody is on the same page here. I just want to make sure that we're talking through or we're, we're, we're, we all kind of understand what this is. So with retrieval augmented generation, well, with an embedding model, we know that there are limitations of these, these models, not, not embedding models, sorry, chat language models. So like an OpenAI GPT-4.1 model or Opus 4.7. We know that there are limitations that that kind of challenge us as we're trying to get information out of them or try to gather insights using them. And some of those limitations are going to be there's a cutoff date, so anything after a certain date is not reflected in that training data in that model. And so if we ask questions, we're not going to get information after that date. There is— it also doesn't know about our private or confidential company information. So anything that is like deep knowledge about our company is not reflected in that data either. And so that makes it harder for us to, you know, get information out of it that is based on our specific use case. Another one that is an interesting limitation is there's research that shows that— so these models are getting larger and larger context windows, but there's research that shows that even with a large context window, the information that we try and get from the middle of that context window may not be as accurate as what we can get from the beginning or the end of it. What we can do with RAG is to actually give the model the information that it needs, using a retrieval process. In this case, we're gonna have this vector database in this example here that gets the information that our company's information, in our case, it's gonna be like our customer use case information, our customer support information, and then it gets passed to the LLM and then returned to, massaged a little bit and as output to the user. And so the, the process here is we have all of our, our source data. So in this, in this use case, this is an e-commerce use case here. We've got source data, which are product descriptions. It has to be chunked into smaller pieces. It has to be embedded into a vector embedding. That's what's stored in the vector database. So in a dense or sparse index, we're not gonna get into those details right now, but just understand that it's, vector search. And then when we do a query, the user inputs a text query, natural language text query. That query gets embedded as well. And then a comparison happens within the vector database to find out what is the nearest meaning, nearest vector in to that query or the nearest set of vectors to that query. And that is what actually gets passed along to the model, both with the, the, the actual query that the user is asking about. So this original query plus the results get passed into the model and then it generates an output based on that information. So it's pulling in that, that authoritative information so that it can actually generate better output.
Yeah, I think, I think it's worth mentioning, like I just said, like that this, this, this keyword authoritative, right? Yeah, that to me is like super important because, you know, the, the question that a lot of organizations have when they, you know, get responses from any kind of AI system is what is the authority that gave it, you know, the right to say anything, right? Like, why should I trust this thing, right? And basically, like, the, the, the two sides of the coin of trust is basically you have, you know, consumer on one side and then some, some sort of an authority on the other, right? Like, and a consumer decides whether to trust that authority, right? And the, the thing about RAG that makes any AI system qualitatively different is the fact that, like, there is a point for humans to author knowledge, right, and give it authority that is very explicit, right? And that is different from just saying, hey, like, yeah, like the model learned this through training and now you could just like get all that knowledge from the model. Um, because now you're putting all of the authority into the hands of an OpenAI, uh, an Anthropic, etc., as opposed to your own organization.
Yeah. Um, you, and you mentioned, um, training as well, and like that if you were to do, like if you wanted to do fine-tuning on this, on a model to add more information about your data, like that's a timely and costly thing. That's another limitation here where Reg can be not just the only thing that you do, but it can complement that. Let's move on to our actual use case for today. We are going to work through a use case where we are managing multiple vacation rental properties and we wanna be able to support our guests if they have questions about an appliance, they have questions about information about their property. They have questions about local recommendations. And yes, we can share the slides after. Yeah. So the— yeah. So suppose someone comes in here, they're staying at your property and they have a question about how do I use this thermostat? It's a smart thermostat. Not everybody has one. They don't necessarily know how to use it. They want to turn the heat up and they might, they might ask a question about how to do that. They either ask you directly, maybe you don't have the information on you. They might ask a question through a chat interface, which is what we're gonna implement today. And it gives them back the, the incorrect instructions. So then you end up not, not being able to serve your, your, your guest needs. So what we're gonna do today is instead of just having one, one knowledge base, we're actually gonna break this up into 3 different knowledge bases based on the properties. So we, we don't just have one property.
When we say properties here, you mean, you mean like the actual little guest house or whatever?
Yes, the, the rental properties. Yep, exactly. So we aren't managing just one property. We actually have 3 or 100. And we need to manage, we need to like serve our guests with Q&A type situation, usually through text. It could be something else if we want to, but that's what we're gonna do here today. So we have 3, 3 properties. We have the Birchwood property, the Hillcrest property, and the Lakeside property. Each of these have different appliances. They have, they're in different locations within the city. So they have different local recommendations. That type of thing. And so we're gonna load our documents, instead of loading 'em into one knowledge base and hoping that we get the right context back, when we say I have, my toaster is broken, it could bring back the information about the Hillcrest toaster when I'm staying in Birchwood. And so by separating these, we actually can get more accurate information. So we just need, we need a different context based on where we're staying. So we've got, we have a set of documents, we're loading 'em into the assistants, the 3 assistants here, knowledge bases, you can think of it like that. We'll do a search of each one based off of the actual query. So in this case, the query is the toaster is broken in the Lakeside property. The LLM will say, say, well, know that this is the Lakeside property, so I need to go and ask the Lakeside assistant. And then, uh, it generates output based on the Lakeside assistant's results.
Jenna, could you explain to, to people, like, what— first of all, like, what is an assistant, right? Like, what is it? What does it do? Like, how does it sort of solve the RAG problem for us?
Yes.
Like, what— how does that work?
Question. Great question. Um, There we go. So an assistant, it's a little bit of an overloaded word in this, these days. But an assistant is a Pinecone assistant. It's a product that we have at Pinecone. And what it does is it encompasses all of these things that I have listed out here. File storage, chunking, embedding, query planning, vector search, re-ranking. And it, and actually technically it does do chat output generation as well. We're not gonna use that feature today, but that is also supported. But it actually— oops— it encompasses all of this.
Like, amazing. So like rag in a box kind of thing.
Rag in a box. Thank you. So each one of these is its own rag in a box. So I'm able to drop in one for each property. If I have 3, I have 3 of them. If I have 100, I have 100 of them. And when we go and look at this in just a minute, We'll see how easy it is to actually configure one of them and/or 100 of them, 10 of them, whatever. Any other questions or things we should touch on before we, um, let's see.
I want to see if there's like any questions from the audience we should answer. I think we talked about our, uh, oh, I love this, Rag on a Rack.
Rag on a Rack, yes.
That's really cool. Yeah, no, I don't think the audience has any questions. I think that, yeah, like what's, what's, what's one, one thing I think is worth mentioning is like, you know, once upon a time when you had to like make a RAG pipeline, there's a lot of work, right? And there are a lot of moving pieces. And so the complexity of your system stops at some point because you're like, okay, like, you know, things are getting too complex. I'm not going to like add more components to this situation. Now that we have Assistant, we have like these, um, uh, RAG in a box, then like the complexity of our system can grow and we don't have to worry so much. And this is why like we're starting to see these very interesting compositions, right, where RAG is just a component, right, like that we are— we're adding here and where we can use it in all sorts of very interesting ways. So ways— so like I would love for people in the audience to sort of start thinking about like, again, RAG is this component that can be reused in all sorts of situations. And to share with us, like, how they could— how could they use it in their use case? You know, this is one example of, like, using, you know, each assistant to sort of separate out context and to sort of give better encapsulation of the knowledge so that it's more accurate and relevant. But there are other ways of thinking about it and using it.
Yeah, you actually just started to touch on my last point for this slide, which is This pattern can be adapted for other, other things. So, like, if you have multiple users, you might have one user per assistant or one assistant per user. If you have multiple franchise locations, agency clients, customer support tiers, or maybe you have different steps in a workflow, each of those steps or each of those entities can have its own assistant. Wherever you need to have that separate context, that's where this can play in.
We actually do have some questions coming in. I'll help you by just reading them out. You can answer them and I can chime in. The first question is, can you explain how it was done before the popularization of LLMs?
I mean, I can—
I think, I guess it wasn't really like not exactly this way, right?
Yeah, I mean, I can explain what I would have done, which is a lot of my data would have been in— this will kind of go to the next slide— but a lot of my data would have been in a relational database, relational database versus a vector a vector database, which means that it all has to be structured. And I found— I saw some statistic a while back that like the majority of the data in the world is unstructured data. And you can think of that as like images or images, text documents, like it's not in rows and columns like a spreadsheet, like we're maybe used to. Right. And so So we can't just do a filter on a column or a text search on a word like bank, right? So like we were to do a, just a straight up keyword search on the word bank and these were our options with like a SQL relational database, we'd get these results back and these don't, these are not even related at all, right?
Right, right.
But Pinecone fits in where we can actually search by meaning. And so, we can— we can actually search by— I'm trying to think of like a good query that would work for the bottom two results.
Right.
Like the query there, those mean the same thing. And so, those blue dots are very close together in vector space and that's why we would get both of those back. That's like before, in the before times, we might not get relevant results. Relevant is the right word. I think that's the word.
Yeah, I think that's the— you're hitting it on the head. Before semantic relevance, I mean, there are other ways of doing it. You had sparse indices, you had like BM25 and stuff like that, like you had keyword search, you know, but like you, you, you couldn't hit on that like real, like, again, you sort of assumed that the user knew what they were looking for, you know what I mean? And so like they would use, like we, we would remember, right, like to use the, like the, the specific queries that we expect to come out, right? And it, it's a lot less of a forgiving situation compared to a semantic search. And also, like, once the results came back, again, you would get search results back, right? Like, so references to documents directly, as opposed to an answer to a question. Yeah, it's like now, like, we're in a completely different, uh, different, um, situation. Um, I think it's, it's good if we move to the, to the next question here. Um, so, um, could the assistant be used in an agentic type of, of way, uh, say a swarm of agents and supervising agents to delegate tasks. So yes, absolutely yes, right? Like, that's something that we, we definitely are thinking about constantly, is about how to make, uh, agents use knowledge and how to enable them to do so in a, in a better way. Um, we're going to tease that in the, in the end of our session. We have interesting announcements coming up on around this, but like, definitely that That is the purpose of Pinecone. It's basically to enable the use of knowledge by anything that is agentic, and that includes humans, but also actual synthetic agents that take this knowledge and make use of it. I think part of the example that we'll see here will make that very clear how that could actually be done.
I want to keep moving because I want to actually get to the coding part.
Yeah.
Let's do that and we'll keep more questions to the end. Yep.
Yeah. Okay, I just wanna throw this out here. What AnydayNN, if, if you're not familiar, if you haven't used it before, it's a workflow automation platform. It's combining AI capabilities and business process automation. This, this is the, the official, the official description of what it is. It's what we're gonna use to actually run this entire thing and we could, write all of this, what we're gonna do today, we could write this in a TypeScript app or a Python app. But I don't, today I don't wanna write any code. I actually want this to just kind of run and live on its own. I wanted to have some drag and drop capabilities. So it's kind of a different, it's a different user base that, than someone who's like writing code every single day. So, As I mentioned, our workflow is gonna be handling guest inquiries for multiple rentals. If you don't have the, the re— like this QR code goes directly to the workflow that we're gonna use. You can cop— you can copy it right, scan it right now and get that URL and hang tight. And as we get into this, but I just wanna put that out there in case you don't have easy access to it. And let me move on. So let's get into the actual, like, working through this bits. This is my n8n workspace. I'm running on n8n Cloud. You will need a workspace to do this. You can do it on the cloud. You can also do it self-hosted. I'm not going to— we're not gonna be able to time to like debug through issues with self-hosted. So I trust that, that if you're— you've chosen that approach, you know what you're doing. So you need the workspace, you need a Pinecone account. If you're running in n8n.cloud, we can— you'll actually have an opportunity to create your Pinecone account and get it set up through this workflow, through this interface actually. And then you'll need an OpenAI account with an API key and credits loaded. There's no free tier with OpenAI. So I also put the— I also put the link— or I'm sorry, I also put a note that you could also use— you could also use Anthropic or maybe any— you could probably use other language models if— or chat models if if you have access to that and if NADN supports it. I know that with both OpenAI and Anthropic, those are two— those have two good models that will work for this workflow. Okay, so I'm going to start by creating a new workflow, and you can step through this with me, and what I do is what you can do. So I'm creating a new workflow. I'm not actually going to add any nodes, but the first thing that I need to do is install the Pinecone Assistant node. And you'll see that there's two Pinecone nodes here. One is the vector store. So this is the vector database node that interacts with our vector database, similar to that first RAG slide that I showed where you have to manage the embeddings, chunking, re-ranking, all of that stuff. But we're gonna use the Assistant node today. So I'm going, oh, I've already installed it. If you haven't installed it yet, you will see an orange button here. You will press that orange button and it should install, and then you'll eventually see this screen. So I'll give you just a moment to do that. It shouldn't take very long, but once you see this screen, You'll note that this little purple banner, we do have a little promotion going for anyone who is upgrading to a standard plan before May 1st, which is in just a couple days. You can get, I think it's 6 months of platform credits when you upgrade. So keep that in mind. You'll see another note about that as you get going. This node, it supports a few different actions. The ones that we're gonna use today are going to be uploading files. So we're gonna upload those files from our vacation rental properties and then we're gonna get context snippets. So this is the retrieval part of what we're going to do. And once you've installed the node, we don't, we are not actually gonna add it to our workflow. Yet. Instead, we are gonna take that raw JSON file, or the, I'm sorry, the GitHub link that was in your, your, that was in your resources and copy the link and paste the link onto this workflow canvas. You can also— there's other ways of doing this as well. You could import from URL and do the same thing, paste the URL. It's gonna just import it right from GitHub. And I'm gonna get this a little bit smaller and this a little bigger so we can see what's happening. So this here is our full workflow that we're gonna work through today. Some of this, this is all wired up for you, but there are a few things that we need to set up and then we'll walk through each section. So each section, step 1 and step 2, and then run it. Just like in, on one of the slides I showed that there's kind of that ingestion step of where we load all our files and then there's the query step. Those are our two main steps that we'll see here. And let's see, for this ingestion step, I just wanna point out a couple things. I'm gonna zoom in a little bit more. So we're gonna look, these are the URLs that we're going to get our data from. All of this today is just, it's fictional data that I generated with Cloud Code because I'm not actually a vacation rental property manager. Some days I wish I was. But so we have a bunch of markdown files and this is what they look like. There's 3 files for every property and you can see that here. We've got just, it's just as an array of the URLs that we're gonna grab the data from. That's all this is here. That's what the set files URL is. Node is then we download each file and just the way it downloads with from GitHub, it downloads it as text, but we actually want it in a Markdown format. And so we use this convert node to get, to get that Markdown.md file name, file extension at the end. Because when we upload it to Assistant, Assistant is gonna do something special with that. This, the switch node, this node, this lets us make sure that we're uploading each file to the right assistant. So you can see here we have a Hillcrest assistant, a Birchwood assistant, and a Lakeside assistant. So in our switch node, we have a tiny bit of code that just looks at that GitHub URL where that, that data was located. And it says, is this part of that URL equal to Hillcrest? If so, we're gonna upload it to the Hillcrest Assistant. And, and just so you kind of understand where in the URL it's looking, it is looking at this part of the URL, that Hillcrest. And so we've got one rule for each of these. So we've got the Hillcrest rule, the Birchwood rule, and then the Lakeside rule so that they each go to the specific assistants. Now I need to set up the assistant. So the first thing we're gonna do is we, we need to set up our credentials. Again, if you're in N8N Cloud, you can click this connect to Pinecone button. And, um, you'll select, uh, your org and project DataCamp Code Along and click authorize. Um, if you have already set up your Pinecone account, that is the flow that you'll see, um, when you click that button. If you have not set up your account yet, this is the time to do that. I'm not going to pause here for too long because we're going to be tight on time and I want to make sure we get through stuff. But just know that like that will step you through the majority of getting it set up. So now that, now that we have our credential set up, we don't have any errors there. We actually need to create our 3 assistants. So you can see that there is an error on this assistant name and that's because this assistant, N8N Vacation Rental Property Hillcrest does not exist in our account. So if I go over to the Pinecone console and I look at the assistants section in the menu here, I can create 3 assistants. I'm going to create 3 assistants here. And what did I— I don't even remember what I called it. Anytime Vacation Rental Property Hillcrest. And something is happening. Sorry, I think my keyboard has disconnected or died. Okay, I think, yeah, okay. So we create the first assistant. We're not going to do anything here. I'm just going to go back and create the second one. Um, create assistant, and we'll create the third one. Okay, back connect, keyboard is connected. Okay, so we have our 3 assistants and we can see all of those in this little dropdown here. We're not, we actually don't need to do anything in this UI and I'll come back to it in a minute to kind of walk through a couple parts of it. But I wanna, I'm gonna go back to the workflow now and This should now— I think I gotta get out and come back. This will now populate with our 3 assistants. So we have the Hillcrest one assist selected for the Hillcrest assistant, Birchwood, and Lakeside. And just to like, just a note on this external file ID, we're storing, we're actually storing the full URL that this file came from. If you had some other sort of file identifier, you would use that. This is— this just helps us manage the file later on, so if we want to update it or delete it later, it gives us access to do that. You don't need to worry about this source tag, that is just so that we know where this— where this workflow is used. And so now we have this, we have this first step all set up. We don't have any errors in here, and we can actually run it and see what happens. And we can see the files were downloaded. They're now uploading to each assistant. Workflow executed successfully. I did, I skipped over this this, this first node here, this is just a manual trigger, but it could be a Google Drive, it could be Dropbox, it could be any place where you're storing, storing your data, your raw data that can trigger, trigger this. Rowie, did you have a question or did someone have a question?
There are a lot of questions in chat, but I think we're gonna soldier on.
Okay. Okay.
You know?
Yep. So we can see those files are now uploaded here. So each assistant has those 3 files. So I can look at each of them and the files. The other, these other tabs here give you information about this assistant. Each assistant has its own MCP. You can interact with it here in the console if you want. We're not gonna do that today, but you can choose a chat model, ask questions down here, give it instructions. This is similar to what we're replicating in N8n. You can connect using the actual code. And we do have, I believe, a new data connector here for Google Drive if you wanted to do that outside of N8n. So back to the workflow, let's actually get this next section set up. We have, now that we have our files in each assistant, we can get this part of it set up. So here we have a chat node. This is just the kind of the standard N8N chat node. We could enable kind of a web view, a public web view for this chat. It's very generic, but you could also do like Slack, you could do WhatsApp or Telegram. You could also build your own front-end app that integrates with this or put this on your website and use a webhook to actually trigger this part of the workflow, the conversational part of the workflow. This AI agent node, this is kind of the, this is the big orchestrator of a lot of AI workflows within n8n. So it takes a chat model, it takes, and it takes a set of tools. We've also got memory in here. We're not really gonna talk about that today, but we've got our model, which is gonna be, we're gonna use, I'm gonna use OpenAI, one of their models. If for some reason you don't have an OpenAI API key with credits loaded, You could also swap this one out for an Anthropic one. You would delete this, this connector here. And then I'm gonna show you really quick and then search for an Anthropic model to add that node. And we're not gonna do that, but that would work too. So I'm gonna connect this back up. We're gonna get loaded with our OpenAI credential. This node does not have any of Den's nice handy-dandy quick connect like the Pinecone Assistant one does. So I'm gonna click this setup credential button and I have an API key handy that I'm going to paste in. Um, we'll get that set up. You'll save this, close it, and now we don't have an error there. Um, I'm just going to use this GPT-4 Mini. This is the one I've been testing with. Um, there are probably other options, um, for, for the purposes of this kind of simplified workflow, this should be sufficient. Uh, if you're using the Anthropic, um, anthropic, um, an anthropic model, I would probably suggest one of the Sonnet 4.5 or 4.6, um, models. Um, um, let's talk about this AI agent a little bit more. Um, I mentioned it in passing. This, this accepts that chat message that comes from the user. And we have a system message. What's interesting here really quickly is that we are telling this model decide which— figure out which user the— figure out which property the user is referencing. And if they're not, if they haven't referenced it, in their message, ask them. Let's go on. And then we have 3 tools. So here each assistant is considered a tool. All we did was click this plus button, added Pinecone Assistant in here, the Pinecone Assistant tool. Each one is configured very, very simply. Like I mentioned earlier, these are kind of, you drag 'em in, you select the assistant that you wanna point it to. The query is automatically figured out for you and that's it. Here we're just getting context snippets. We're not doing anything fancy. It is just getting the chunks back based on our query. So let's, we're gonna run this. And let me clear this out. If you would like some sample queries, I've got some. There's the instructions here on the side, so you can run through this on your own if we've gone through it too fast. But we've got some sample queries here. The first one I'm going to do is—
Hey, Jeanette, just one thing that I'm seeing in chat quite a lot is people are just trying to understand again how to load the JSON onto n8n. Okay, just loading the, the workflow. Um, I don't know if you already covered it or not, but, um, yeah, maybe just give people a short reminder.
Yeah, um, so we'll go back to that workflow in just a second. Um, so you create your new workflow, you click this Create Workflow button.
Yep.
And then you can take that URL and just paste it anywhere on this page. It's not—
can you show people where that URL is? I think that was another question that was being asked.
Oh yeah. The URL should be in the resources. It is not this one. Let me, I can paste it in chat.
Oh, there we go. DataCamp did us a favor and dropped the URL for us.
Thank you.
So thank you, DataCamp.
Yep. Yep. So you can take the URL itself and paste it here on this page, anywhere on this page.
Not even the contents, just the URL.
Yeah, just the URL. Exactly. Exactly. You can do the content, but the URL is even easier. You could also click this little three dots up here and do import from URL.
Fantastic. Okay. We can resume our normal program. Okay. Thank you.
Yes. No worries. That's, that's a good question, and we kind of knew that was gonna be a, a little bit of a road bump. So thank you for asking. Okay, everything's set up here. I'm gonna zoom into our section here. I, as I was mentioning, all the instructions are actually in the workflow now that, now that you have it, and we've got 3 queries that we can use here. And we've got— I'm gonna just ask about the coffee maker. I'm not even gonna say what property. I need help with the coffee maker. I didn't say which property. So we wanna see that this comes back and asks, could me— could you let me know which property you're staying at? We can see in this little trace here that it checked in with the model, it checked in with memory, it didn't have any information, it doesn't know what property you're staying at yet. And so I can just say, let's just say Hillcrest is where I'm staying. And now we can see that our chat message came through here, through the, the agent, the chat model. It then came and went to the Hillcrest assistant. And let me make this a little bit bigger. We can see here it's actually talking to the Pinecone assistant for the Hillcrest property. And we've got, I can't remember how many, how many snippets we get back or how many chunks we get back. It's probably like 20. But we've got each of the, the raw chunks snippets that come back from that document that we uploaded earlier. And so these are, this should have all the information in it and we can see what it does with that. It takes this context, these snippets, and it passes it along to to the model as the last step. So we've got our system message, the actual query that we asked about, actually our full conversation, and then it's passing in information from the tool. This is the augmentation part of RAG. It's passing in that context so that it can accurately answer the question for the user. So it passes all the information in and then this is what gets output. It generates an output based on that information. So we say, so it says the coffee maker at Hillcrest Haven is a Brewmaster Pro, blah, blah, blah. Here's some information at the bottom. If you have, if you have more questions, let us know. I think I'm gonna stop there. That's kind of the main, there's a couple other queries. So if, if you've gotten through this far, I'd suggest like checking out these, these other two queries that we have examples for. They'll demonstrate a little bit more. You can even say the air fryer isn't working at the Lakeside property, and it will understand that like you've changed properties and answer that question about the air fryer. All right, I think I wanna make sure we have enough time for any big questions. Um, or is there anything in chat that's like that we should address again before we, um—
Yeah, thank you for that. Um, that's very, very cool stuff. And yeah, for anyone in the audience who wants to ask questions, now is your time to ask. Um, I very much enjoyed that, although I have to say now I just want to go and have a vacation in there. I know, right? Uh, actually, uh, while people in the audience are thinking of questions, I've got for you. So you had these sort of personalized assistants for every single property. Yeah. I imagine once you have like more than 3 of these, like you could easily have like hundreds, thousands. I don't know how far it scales, but it sounds like at some point you have to manage them. Like how do you think about how much you want to personalize stuff versus how—
Yeah. Yes, I will. We lost Richie, but I will answer that question as best I can.
I think I disappeared halfway through that. Am I back?
No, we got most of it. We got most of it.
Okay, yeah, how do you manage all these personalized assistants?
Yeah, so I think there's probably a couple different ways. Like, at that scale, you're probably not doing it through the Pinecone console. You might— we do have a Pinecone CLI tool, I believe.
And you can, yeah, and you can create, you know, and manage your assistant through the API itself.
Yeah, yeah, exactly, through the API. Yep.
Right. So there's, there's a lot of, a lot of ways to manage it. The question is like, do you want to manage this many assistants in the first place? Like, is that like, right pattern? And I think that like, generally speaking, like, the way we like thinking about these things is, you know, you think about the purpose of the assistant, right, and how people are going to use it. In some cases, you might be able to get away with namespacing and sort of doing things that way. But in other situations, right, like you want to basically think of it— again, this example, while super cool, is essentially a contrived example, right? Like it might not necessarily be like the thing that will work in a production scale. I think if you have thousands of properties, right, like you probably are going to want to combine them logically, right? So like, you know, if you have like, an apartment building and all of the apartments sort of work the same way, right? Like, and have the same issues, right? And have the same layout, right? Like, those would be grouped in a single assistant, right? Like, and, um, if you have different— again, and the different types of properties will probably like spin out, right? So if you have a hotel, right, that would have a separate assistant, right, for that. Um, because like the, the, the behavior of the user and how they interact with this knowledge is going to be different. Right. So the axis is really like, not necessarily like individual units of a thing, right? But rather like the domain and kind of like behavioral patterns, right? That you see with that knowledge base. Okay.
All right. So you really think about like, what are the business problems I'm trying to solve?
Exactly.
And then it goes from that to figuring out the technology.
That stuff doesn't go away. You gotta think about like how you're gonna architect it for sure.
Opponent challenge. All right. So let's go through some of these audience questions. So DJ Shah asks, since LLMs have web search, do we actually really need RAG?
Great question. It is, I mean, if you think about it, it's technically a form of RAG because RAG is Richie Cotton. It is. Yeah. The form that we showed today was using a vector database, or that was our original slide, a vector database, and then in our demonstration was the assistant, which is essentially a vector retrieval. It's just a little bit different, I think, um, you're, you're not— it's not one or— it's not ever going to be one or the other. It's going to be complementary. So like, I, I could— like, an example here is maybe the Wi-Fi password is stored in, um, in these files. As a, as a guest, I can say whatever, whatever, um, property I'm at. I can, I can, uh, lie and say I'm at the other property and I want that Wi-Fi password. That's how this setup is working today. But I could add another tool here that goes out and maybe it doesn't do a web search, maybe it does some sort of system authentication search to see like, is this person actually at the Hillcross property? Should they get that Wi-Fi password? So it's just, it's just another, another tool in the toolbox.
Yeah, I totally, I totally get. I would just add to that, like, like I think the point that that Jenna made is like, we have to start thinking about like the bigger pattern, right? The bigger pattern is LLMs don't know anything, right? Like we have to augment their knowledge, right? Like the knowledge that they have is their own and we have to, you know, either implicitly trust it or not. And then if we don't, then we move out to another authority that we trust and that could be the web, in which case we have to trust the web or we're trusting our own knowledge, right? And the knowledge that we own and we manage. And then like, like Jenna said, right, like we decide what parts of that knowledge do we give people access to or don't give people access to. And those are all the same patterns where we augment the response with, with, with some retrieved content.
Nice. Okay. Good. It's very thorough answer. So let's go to some more questions now. Um, I remember a few years ago before we had this rag in a box or the rag and drop, maybe.
Rag and drop.
I love that. Rag and drop. That's really good.
That's really good.
Uh, it's giving you some marketing, uh, your marketing team some ideas. Uh, okay. So before that we had to do some quite low-level coding messing about with like, how do you, uh, convert this document into like chunks of document? How do you figure out how these, how much these chunks overlap? Quite low-level stuff. And so, yeah, this Digital Health Off the Record has asked, how do you figure out what these numbers are?
Yeah, well, with today, we didn't have to. That is like one of the benefits is it does it for us. That, that's like why I like this product so much as this drag and drop, drag and drop, drag and a box, is I don't have to, I don't have to think as much. And as as someone who is maybe running a business and is not a technical user or is very focused on the business side but not the actual technical details. Like, I don't want to have to spend time getting up to speed on that. So that's the benefit of Pinecone Assistant is it is using our tried and true research-proven method for choosing chunk sizes, chunking based on— I actually missed this part, chunking based on the file type. So Assistant supports text, markdown, I think JSON, a Word doc, and PDF. All of those are formatted differently. And so under the covers, Assistant decides based on the file type, I need to chunk this based on markdown. I don't know the exact details, but it's using some sort of markdown chunker that is probably doing it based on those headers and other formatting information so that it is using best practices for that particular format. And let's see, what else was I going to mention there?
[Speaker:JASON] I mean, if you don't use like these automatic magical ways, right? Like like, the— I think a rule of thumb of how to think about it, right, is you want your chunks to be a coherent semantic unit. Meaning if you have like a section in a document, right, like that is several paragraphs long, right, like that combined together naturally, meaning that like the— that it doesn't move from topic to topic, right, or it doesn't like talk about completely different things, right, that's a, that's your unit, right? Like, that's a semantically coherent unit, right? Um, you don't want it to be too big and you don't want it to be too small, right? Like, the, the idea is that, like, you have, like, when a retrieval happens, that the content that surrounds the, the thing that you hit, right, kind of makes sense to live right with the thing that you just retrieved, right? So either, either— and, and you can go and visit our website, we have a very long article about chunking strategies. There's like a whole different set of ways to do it, ranging from like, again, like very static kind of like chunking methods to more agentic sort of explorations of the content that sort of give you that answer that you're looking for. But like, really, like that, like, I think that we're entering an age where you don't have to care about it, right? Like, again, Pinecone does that for you. And does all the optimizations that need to happen for your retrieval to be the best that it can.
Okay, it's kind of nice that you don't have to care about it. I think about like all those early computing books were from the '70s where it's like, you have to figure out your random number generation algorithm or whatever. It's like, no one's thought about that in decades.
Because it just happens.
Yep.
Absolutely.
Wonderful. So there's a related question here from from Sly saying, when do you do indexing of this? So you're gonna index stuff to increase performance. It's something like database admins have to worry about. Is this something that's taken care of automatically or do you need to manually do this? And what's your strategy?
Yeah, great question. So the, the high-level generic answer applies to both Pinecone Vector Database and Assistant. You can update, upload, update your data, upsert your data in real time, and it will be reflected in near real time. There is indexing that happens in the background. I don't know the details of that enough to talk about it here right now. Roey, maybe you can if you would like to, but it does happen for you. You don't have to think, you don't have to press a button, you just upload. Either you're either uploading your file or uploading your file or you're upserting vectors or text if you're using the database and it happens for you.
Yeah, I think that's— there's a reason why you don't have to know, like you said, Richie Cotton. This is like one of the things that nobody should care about how to index something, right? Like it just happens, right? That's the bottom line here.
There's probably one database admin somewhere getting really sad about that. I care, I care.
I want to index things, please.
Yeah, no, no, If you do want to understand the under-the-cover stuff, we've got blog posts out there that talk about it. Talk about the architecture and how it works more specifically for database. I didn't mention this earlier, but Assistant actually runs on top of the vector database, our vector database. It's subject to the same rules and operational stuff as well. So, um, yeah.
Okay, all right. Uh, now I've got time for one more, so I want to take this one from Eduardo just because it's like, what tends to break first? And I think that's always a good attitude to have, like, what's going to go wrong? So, um, yeah, uh, what goes wrong when you're building a system like this?
Um, I will answer first because I have real-world experience in building this workflow template. Can you actually put that back up? I just want to see what— it had some ideas there.
Oh yes, that is routing accuracy, retrieval quality, orchestration.
Yep. So for me, it was the routing accuracy. I spent a nice chunk of time on that system prompt to make sure that the AI agent system prompt to make sure that it had good instructions and I had to dig into the instruction, like how OpenAI models consume instructions and use instructions. I hadn't done any, it's not terribly sophisticated, but I wanted to make sure it was formatted right and I was saying it the right way so that the model listened to me and made the right choices. There was a bit of back and forth there. I had actually shared this on, I shared this workflow on Reddit as I was working on it and someone suggested adding a confidence score after that selection. And I did play around with that and I have that working just not in this final template, but that would be another option for kind of fiddling with that. As far as the accuracy, I don't— I didn't experience that. Like, there's not a lot of data here, so it's hard to really prove that other than just eyeballing it. But yeah, Roy, do you have any other thoughts? I think you've probably done some of this too.
Yeah, I think that like kind of brings us up to like the slide that is going to come up here and that Reese is going to put back up for us in a second here. I think orchestration is perhaps like the one place where people sort of have some challenges. So we've seen like a lot of people use assistants and like, you know, NNN is like a great example of, you know, a place where you can manage that orchestration to sort of bring all the pieces together. But like the problem and the challenges that, you know, a lot of these processes processes go beyond just like the pipeline itself, right? It's like making sure that your data is ingested and you have like multiple sources that ingest it, and then that you have an application that serves it, and that there's some, you know, way to do authentication. And again, like thinking about like, you know, simple things like, um, how do you get a user that's using your system started, right? Like, do you give them some starter questions? Um, are those questions going to be answered correctly if there's like ambiguity in this, right? Like, how do you manage the routing over time, etc., etc., etc. So like, I think that like the devil's in the details, right? Where, where it comes to like deploying real production applications. And again, as a tease, next week we're going to have like a full week of announcements that— of new products coming from Pinecone that are meant to do two things. One is to really is to prepare people and their systems and the things that they build with Pinecone for this new agentic era that we're getting into. And sort of, it's very obvious that that is picking up and people are sort of trying to figure out how to make it work for them and their companies. And the second thing is to sort of fill that gap between the pipeline and the application, right? From this, like, you know, I have this idea for some knowledge that I want to be able to share with other people, whether it's within my company or outside of my company. And then how do I operationalize that? So that, that those are real problems that people have. And those are some of the problems that we are trying to tackle in this coming launch week.
Okay, so yeah, sounds like building like entire system of things. It's still a bit of an art. This is still like some challenges. So yeah, I guess for anyone who's interested, do sign up for Launch Week, see what, uh, see what's going to be going out there. I say, before the session, I was trying to grill Roy on, uh, what was coming soon. He was a bit tight on the details, so you're just gonna have to, uh, sign up for it yourself and see what happens next Monday. All right, uh, with that, we are at time. So, uh, please do come back for the rest of the sessions in, um, in the Agents of the Enterprise week. So tomorrow we've got an L&D, uh, session On Friday, we've got a session with Omni, so you're learning how to use AI to build things for business intelligence. Plenty more sessions next week as well. So, uh, thank you, Roy. Thank you, Jenna. Really cool stuff. Uh, great to have you here.
Thank you.
Yeah, thanks so much, Richie, and thank you to DataCamp. Um, yeah, thank you.
Yeah, glad you enjoyed it. And thank you to everyone in the audience who asked a question. Thank you to everyone who
More from Richie

#359 My Best Friend is AI with Valerie Tiberius, Professor of Philosophy at University of Minnesota

How AI Agents Will Work While You Sleep | Ruslan Salakhutdinov, Professor at Carnegie Mellon

#358 How AI Agents Will Work While You Sleep | Ruslan Salakhutdinov, Professor at Carnegie Mellon







