# How we built an PostHog Analytics Assistant with AI Agents @ Tech:Berlin Hackathon [Update #10]

## Метаданные

- **Канал:** n8n
- **YouTube:** https://www.youtube.com/watch?v=6SQ56DQZ3hA
- **Дата:** 02.10.2024
- **Длительность:** 55:53
- **Просмотры:** 2,804

## Описание

In this special edition of the AI Sprint, Max hacks along with Marcel through the weekend at Factory.Berlin for an AI Hackathon. They competed with 26 other teams and brought home a Silver medal. 

They used n8n to build the front-end and back-end for Professor Dr Scientist: your AI Agent powered PostHog analytics assistant. Within 48 hours, they made an MVP solution that could analyze @PostHog data, make advanced queries, and even perform a User Segmentation Analysis based on user specified goal.

Watch the video to see how these pair of flowgrammers competed against 25 teams who used native code in their solutions. 

00:00 - Day 1 Start
02:10 - Planning our Project
13:48 - Slick Work Montage
36:43 - Day 2 Start
45:52 - The Pitch
50:13 - The Judges’ Verdict
51:35 - Team Reaction

--

🛠️ Ready to build your own AI tools?
Follow the journey and start building with us:

🔗 Explore the AI Sprint Project: https://30dayaisprint.notion.site

📺 Hey Siri AI Agent template: https://www.youtube.com/watch?v=dewsB-4iGA8
🔗 Try EmailSpy - domain to email tool: https://emailspy.aisprint.dev/
🔗 Download the Notion AI Assistant Generator Template: https://n8n.io/workflows/2415-notion-ai-assistant-generator/
🖼️ Flux Image Generator template: https://n8n.io/workflows/2417-flux-ai-image-generator/


--

💡 Make sure to LIKE & SUBSCRIBE for more AI builds, automation tips, and product launch updates! Let’s keep the momentum going.

🔗 Connect with me:
Twitter: https://x.com/maxtkacz
LinkedIn:  https://www.linkedin.com/in/maxtkacz/

## Содержание

### [0:00](https://www.youtube.com/watch?v=6SQ56DQZ3hA) Day 1 Start

all right just getting up a bit Nowa heading to factory bill in I just saw a father jump onto the uban train tracks to grab his kids ball that's dedication right there that's the kind of dedication that inspires me to build with AI all weekend but I don't recommend doing that that's rather dangerous all right where do we go this way don't get run over Max I made it to the factory we've checked in Marcel's hobnobbing with some of the other teams seeing what ideas they're going to be working on we're getting a quick coffee in and then we're kicking off in a few minutes the hacking begins soon I'm also looking hey marel ready to hack today this is like the open ceremony really curious what other people are building I have you kind of competition here hello and welcome thank you for being here we looking forward for a nice weekend packing and first things thank you from the techine team that you're all here we are trying to organize more and more Tech events in berin everything for Developers for Tech entrepreneurs Ben and N from De Berlin basically carry this Tech want a big Applause to them K thank you so much I'm Emmanuel I'm from Factory Berlin in case you don't know factory runs the building you're currently standing in but we are so much more we are a business Community that's C which means people have to apply consisting of artists and entrepreneurs and what we want to do here in Ben we want to create meaningful events meaningful exchange between people there's 24/7 exess so you can stay here the whole night you can I don't know if someone of you brought like a sleeping back or something that's the rough agenda so Sunday 2 p. m. team submission deadline add two the jury will also go around and talk with the teams get the demos the jury will then decide for seven finalists who will have the chance to prepare a little bit of their demo and the more proper pitch this will be at 500 p. m. Opening Ceremonies and all that

### [2:10](https://www.youtube.com/watch?v=6SQ56DQZ3hA&t=130s) Planning our Project

kind of stuff's done um now we just open up our laptops and like what now it's the scary part you know we are not really from the domain knowledge MH so I think the next steps would be figuring out what insights should the product inside the agent gers take it sounds like at a high level we're figuring out the tasks that it's can do one thing we discussed I was watching our you know the last thing we did and we were talking about how one way to structure it could the user is going to ask some kind of question or for some sort of answer that we then run that through some sort of intent router yeah and match that to a specific task but once we infer that you want to do this kind of task we can build an agent that just focusing on that task because creating some single multi- agent that can do it all is just going to be too ambitious it's also probably not a best practice like if this product would IMM mature you probably want to maintain a few separate agents that do that specific thing well because then you decouple the identify what the user wants from the do that very well yeah let's come up with what those tasks could be because then we can go task by task and we could descope top like topish show super kind of supervis agent who takes the ra input of the US and figures out how can I have with the question and we just provide this agent like the tools or provide them other agents so this agent can give you access to user loggings user Behavior stuff this agent can crunch numbers right and the top agent supervisor agent like figures out the way I think the way we could structure this too I like I think modularity is going to be important here some of the things you were talking about I see those as being tools that different of these task-based agents could consume like oh for this task I need to do this I need to pull a user and maybe there's going to be an agent that can be used as a tool by other agents that knows how to pull a user or maybe not at that level of abstraction whatever so I think step one tell me if you agree we set up the notion and we got to come up with we have to do a little research but what those couple tasks you want to tackle we don't have to necessarily do all of them but have a list of tasks let's rank order those so we know which one is our highest prior lowest prior task definitely and then come up with the highle tasks outside of that because I could see if there's going to be a little uiux to Define more on the ux like for onboarding what information do we need to grab from the user I can flow that out yeah while you're researching maybe validating like for the first task okay have an agent crunching numbers do a spike on something like that how does that sound sounds awesome let's start right yeah let's make that notion page let's go so our thinking right now is we're not sure exactly how we're going to do that but we need to first break down the things that we want our AI to understand yeah then we can figure out how we're going to model that I think that is also like a really solid approach we have the challenge that it's really domain knowledge heavy and I think starting with domain knowledge prom part super interesting and I think we also figured out that way we also thinking wi how the agent should be structured we know have this how would an AI product analyst insides agent work from a prom perspective and then we can transfer there's kind of how we structures the prompt to different AI agents and give them like the right tools so I think that is a good way to start it and then we can just enhance like in the details but having those I think four pillars as you mentioned user account feature and funnel is like a pretty good structure how the main agent would also structure its TS so it's also how we structure our workflow right and one thing we were talking about um right before we started recording was the idea that we're going to create a schema and maybe that's what I could do next is like create a schema out of this yeah of these are our standard entities these are standard property attributes of these entities and these are the relationships and then we were thinking of when we actually architect this we could probably decouple the part of the workflow that interacts with post hog and Maps like for your specific post hog to these entities so that'll be a separate logic and then once that mapping is done then we have our AI agents that interact with those standard mappings yeah what we create by that is almost like an integration with postt so that if we want to add another tool in future we can recreate that logic make it work for that integration and then we have all of our Integrations basically standardizing that so our AI agents have a standard language that's agnostic to something like post hog oh that would be super cool speaking of post hog um AR was setting up their demo they have the PO Flix demo that is also where I think I have bad news for you m we actually don't have exactly s application as example data we have a Netflix okay well Netflix is sass do you think I think that subscription then let's think about what are kprs for insights and I think for Netflix it's naturally watch time and stuff and actually I think for most s applications you don't want to have like people watching an entity for a prolonged time I think for regular s applications more like reach this point of watching something right but let's see we have this demo data and I already set it up oh yeah by way Fe us two days throughout the weekend we're staying hydrated and nourished by the beautifuland of and um I think the review was it doesn't taste that [ __ ] okay back to it having now a look at the data like the most The Next Step because we have figured out like domain knowledge part kind of a thing and how we structure the thing but now we need to marry those with exual data yeah because we don't want to build an agent and then the data is completely different and you know what this makes sense because we were talking about let me create a scheme of the standard data let's create that schema when we have the demo data so we can do that translation manually once and we can validate that our schema is realistic cuz if we have a if we can't map that post data to our standard schema how's an a Okay cool so let's go find some good demo data okay marel what just happened we had our first major breakthrough after trying to figure out for at least one hour we finally half hour data yeah so we got demo data in post hog exactly now we got to go figure out what St looks like if it's like the right kind of data for us to work with it's a Netflix clone we were concerned that the data might not be representatives of a lot of sasses but it's the only demo data that post has available there's also a suspicion that it's probably pretty representative cuz otherwise they probably would have made a different set exactly I would also assume that now we have good Insight I think all the data that post it should be contained like all features of post so we can you like I would assume and so what I'm just finishing up a quick Loi flow for the onboard we have an onboard we have a Launchpad screen which kind of looks like chat gpt's screen where you can like start the prompt yes that will open up a chat trigger experience actual tasks so in a second that'll be done you can review that so we're all aligned that great this is cuz if we align on the UI we have a better idea of all how it all flows uh we were going to create the Baseline a very naive AI agent that just works with this and create the Baseline sort of crap response so that we know what we can improve on exactly I think that is something that I can work on metime you're building the UI yes yep perfect so I'll do UI and schema and then you're validating the naive approach so we set a Baseline and also so you can get an understanding of this post data CU we're going to need to understand that we going have to teach our AI how to use that exactly cool time for some coffee though too yes marel where we at I think we've figured it out or at least an approach from The Prompt side right we need to make the AI like understand certain Concepts and we're breaking that down and we were using GPT to help with some of the ideas but where we're at is we're thinking about it like insights so there's going to be some standard entities that and we're focusing on like a SAS app right now cuz there's other product analy you can do but if we can focus on that domain there going to be more that similar across these apps so the standard entities that we got to teach our agents to understand entities like user users can form an account so an account being more like a company right when you have like a team or something yeah there's features and there's funnels like people going through certain views in an app experience these are all Concepts that are important to product managers to the folks crunching this kind of stuff then there's these standard entities usually have standard attributes so like a user will have a location usage of certain features user attributes like the acquisition Channel these are all things that we might not necessarily have but these are standard properties that we could teach the AI agent and then we're going to have a step where when it's analyzing post be okay which of these standard attributes can you infer maybe we'll have some steps where it has to ask youer hey I think this is acquisition channel is that correct yes it is and then it can save that and remember in future that this property on this so the standard properties of each entity like a feature could have this as well and then if we Define standard entities with standard attributes these then have relationships between them right so one or many users form an account that's the relationship between account and user we can teach that yeah users consume features they either use the feature or not that's a relationship between these two entities users complete funnels we can teach the AI that a funnel is usually chronological not necessarily always but maybe we can simplify that we got marel here he's setting up his little selfie part Little Koala with baby kangaroo up in there give me two it for the we do it for you guys all right let me finish up this Wy okay so I've gotten the LOI done I've shown those to Marcel he signed off on those marel right now is plugged in and what he's doing is now that we've got the demo data set up he's going to make a naive AI agent that is pipe in the demo data and basically start asking the questions from the different tasks that we want to do the logic behind this is that's going to be our Baseline so if we say that today it'd be rather easy for someone to pipe in the postl data into an AI agent and just start asking questions let's say that's like this level of efficacy let's say like an actual data science this is this level of efficacy what we then have is these two points and we need to create a solution somewhere in here ideally here but if it's somewhere in here we're demonstrating value of if you do XY Z if you set it up in this way this is how you get um better result then if you just blindly pipe in your data so that's what he's working on now and then an hour we're going to then work on defining what our standard schema will be and that's what will teach our AI to understand these standard schema standard Concepts so what I'm doing now that the LOI are done is I'm opening up cursor and seeing how quickly I can create my HTML templates for each of the views that we have because then we're going to have NN serve that HTML so that the front end is also served by NN so everything's done by n at end let's get to

### [13:48](https://www.youtube.com/watch?v=6SQ56DQZ3hA&t=828s) Slick Work Montage

work for the rest there ain't no contest so what's next call me leveling up I'm obsessed I bring the possessed to be honest cursor is sups impressive we been working on the front end right now and let's just show you where I'm at firstly the really cool thing about cursor is if I go in here in the AI chat I'm able to provide images as context and different files in my setup also lots of different things I can app mention like docs and web pages and stuff so it's been super fast I'm at the point where I've got a decent stylesheet for it and setup step one and setup step two so if we look in the um lowy the setup steps look like this so I fed in these screenshots into cursor basically did a little bit of back and forth and so this is what we got so far so me I got just a test web hooking in end that's just acting as a mock back end right now so I can test this out so we've already got front end validation right so if I don't enter a URL there it's ask for that if I click continue what it did there in that 1 second is it pinged this endpoint it sent that data there and then once that was successful go to 200 response from the endpoint it took us to step two here so what we can do next is when the actual endpoint returns it can return some sort of ID or something pass that to step two as a URL parameter so what step one page will do is actually just open idal 1 23 something like that so we'll have statefulness for the second step and then this box in here is going to be an NAD End chat trigger the AI agent is going to figure out the questions it needs to ask the user based on their Telemetry that we just analyzed the user will answer those and then the AI agent will say okay we're all done click continue the user will click continue and then on to the next step so some ux that could be improved there but not bad I think for an MVP so now I just got to knock out the dashboard page in cursor and rig this up in a basic NN workflow to have this being served from NN and then we got pretty good velocity at say so far right now it's 1:45 p. m. to find like data SC that P has and let just let the engine form like inar okay basic oh so you want to teach it how to use post hog ql yes makes sense and it has also like great documentation that and at the moment trying to figure out we have the if you remember what we talking before we like we're sing it down to basically four pillars and one of the pillars like already funnel and user Pur so oql already works on the same L layer of extraction as we do uh nice so let's just borrow their language basically yeah borrow their language and teach our agent to use like the these end points from its own varies and they are already pretty much complex cies right you can check for current page you could track specific users or ASP country so from and we don't need to think about that because we just teaching schemers what if we go on the forums of post hog and maybe manually even if we get 10 15 of those Solutions be like hey here's my question and if the solution is the post hog query I could see that kind of helping our AI let's see once we've got you know that up and going and also you know like thing it's pretty much be at the moment so I don't have to much that there's so much information out there in Cur okay I would try to kind of get the best of the documentation and put it into a prompt and I think it turn it to an agent not only a tool okay basically an agent for Pock Q okay cool that sounds like a good step and even if we don't know exactly how we're all architecting this out that sounds like a useful module that we'll be able to use like a lot of these other agents and stuff knowing how to talk to a specific agent say hey what's the hug we should run and go run that cool good Hustle Okay so we've been hack hacking give me some good news myself what are we doing a I keeps blowing our mind all day long you had great success with cursor uh I was building this you uh agent which is basically utilizing or QR uh to access the data from post talk and it works like a charm it really generates cool s cies and stuff through at a very high level the real quick so basically we utilizing um W schema and property schema end points so we are Dynamic post end points and it gives us all the schemers and with those schemers our L like designing agent can work and then we have this tool which yeah just seps the quer so with that we have post talk hooked up and the C was very great so now the next situation for me was okay now let's figure out how can like parent agent handle those queries themselves because they don't want to ask what is the lowest engaging page I want an agent that takes this route itself figures out what Data Insights can we get and then I started to really or really naive agent this was the one that we going face on and as you can see it's most naive as you can go right just using that one tool that you just showed us there there's a roow that I just showed and it has there's prompt which is basically giving it domain knowledge um can we have a PE at that taking inspiration from our first prompt that we had designed a notion and break it a bit down and told the agent that it has access to this tool this powerful tool and we just L digest to because the agent doesn't need to know it's post talk it's for the agent so and then I was running like the first messages and how a user would ask hey we were wondering how can we improve our existing Pages mhm then it went domain knowledge all good and had as ask questions back which is super great because with the first input it couldn't do mhm enough so then I was like yeah [ __ ] my page is broken the user engagement is bad what can we adjust and then it generates insights and those are literally the Ceres from postto that it took and started to do recommendations still there is the Junior stuff sure but it's like our first success group right it's not bad for what almost it's not even 5:00 p. m. yet yeah contextualize this what you've done so far what is that in the grand picture of what we're building I think we actually closed like the first Loop right we hooked up the real data give those data the agent you it actually also calculated stuff but it's more like the sqa C did the calculation right and with those valid data with those calcul data which starts to suggest like next steps and I think this is like closing the big picture and from there on it's just you know like filling in the details giving it more tools giving it more specific prompt and domain knowledge and I think with that we will be able make it more useful right for me it's already useful so here's a question so if I'm looking at this lowii right we've got the multiple tasks that we want to would you say that this is then to ask a question this is our generic task we can make more specific versions of this that are more like maybe in the system prompt or extra context that it has for now these more heightened ones exactly now we can build the more use cases go for specific routing with the agent inject more domain knowledge or t use that endpoint or use this data to determine like sh analysis so what do you think about this cuz I got like my front end it's not connected at all to your system yes let's connect my front end to what you have yes and then we could get the onboarding done then in this view here we'll have just this ask a question one working yeah so that would open the chat trigger that you basically showed us here yes and I'll do the little UI on that so it wraps it in a page with like a back button stuff and then by the end of that we have a full loop of an app and then from there we can decide do we start on these guys do we improve this do we do some other sort of backend stuff but then we have like literally already an MVP oh yeah already which is for me I think we should definitely Explore More go deeper because oh absolutely so let's get it what I sometimes see in this hackathon stuff is you keep going deeper before you get wrap it up and then you realize in the wrap up that there's other problems so let's get the vi the front and the back connected and working with this simple one because then we know there's no question marks that's not AI stuff and then the rest of our time is dedicated on basically creating other tasks improving the current task tools for those tasks to be better but it's all just either adding new tasks or improving the current tasks yes cool awesome sweet all right so I'm Max and I'm not currently sponsored by hu yet but I'm going to try some hu because we got a lot of work to do and I think we need to we need to you know I what is a taste let me know what actually it's not so bad I mean you could lit from that the whole purpose of the products hu if you want to do a super hu me that's basically like super size me but I just hu for like a whole month and then we check with my doctor bring us Concepts right super human me we are so full what time is it marel I don't know 7:00 and we're full of pizza at 700 p. m. it was like I think I heard a 100 pizzas we delivered if you ever want to see 100 pieces disappear go to hack so it's 700 p. m. I figured I mentioned that CU I'm probably going to do like a 24 style countdown clock in the video like beep and you have to add like little tickies we're well fed oh yeah what else how we looking what are we doing we figured I think we have like the lowest agent the lowest tier agent done that it's that is handling data and give us what does this agent do again give us a quick roll up what is yeah it's just accessing Pro data and it uses that's the one that does the Post hog ql whatever and then and then generates make builds its own queries and just answers based on the question that you have regarding the data so then we have the next level where we have this agent who utilizes the data carrying agent and gives him several tasks to fulfill going through specific Insight sits on top of that and Designs like this plan this tasks to execute by the Insight agent that's what we were talking about um at dinner one of the things so before we were thinking we got the different tasks and each task would just go to a different agent now we realize because this lowlevel this base agent whatever we call it this one that we' worked on so far it's so good what we're thinking to try is a strategy where for the specific tasks it's a Serial agent approach so we get an agent that for example has extra context hey you're about to help the user go through a churn analysis make sure to ask these questions from the user and once they're answered generate an outline for completing the task that outline then would get outputed to our generic agent yes the reason we're thinking about doing this is a it's a bit more elegant B we don't create lots of different other agents we can focus on one good agent that understands how to execute a good query and then other agents and decouple the context coming up with a good plan specific test what is also cool with those agents is they're more focused on the specific T if you give one singer agent list of 10 TKS it might be not considering each point uh as way as it should and it will with splitting up the TKS it will handle those tasks better in detail yeah I'm really looking forward to this but Max yes we had only worked on the brain right we also have you've been working on the UI part right thanks to Too Much AI really where are we yeah I've built the whole front basically in curso my built front end is it's sitting on HTML files in my computer and now I'm setting up the setup endpoint that's going to serve these so what we decided is there's one endpoint which is a get request which serves the actual website and then in the same workflow with the same route there's another web hook that will be the back end for that flow p a post request so they can still both of in the same flow so it makes our flows a little easier we don't have basically double the flows and so what I'm working on now is I've gotten it to where on the first step of the setup form it submits that form it adds that to a super base we get the super base ID in the super base we're saving all the details like the post hog URL all the stuff that we're going to have to State pull up for each query and then it sends that ID to the Second Step where URL parameter so I'm hooking it all up now but basically I'm working on having the onboard flow complete set the state in our super based database so we're going to use super base for anything that we need to be stateful and then from there check in with you next cuz then I'll have the dashboard page or the launch pad page where we need to integrate when users clicking on that it opens the right chat session on the stuff that you're working on now so that might take me 30 minutes 45 minutes I don't know but then soon in our next little meet we can figure out how we're basically marrying those two oh yes and then we'll have it from there we marry it we go to an MVP and from there it's basically decide do we want to focus on one tus add more that's a great place to be at yeah it's 710 it's awesome it's for as low code always is right do you think this is enough fake T typing time yeah are we good or I was I had faked thinking time uh people actually think on a computer they look so angry and Mee as a like I watch a lot of user interviews Focus human on a computer scary thing we look so brained Dead playing video games if you ever watch want play Xbox or Playstation yeah so Focus what why did it fail what did you do no it sealed ID expect uh it's probably with some [ __ ] that I did project context is zero this is Project ID is also zero oh because it's us as the first entry oh we it's using entry one and so the reason it failed because we hardcoded a test value that's good because we can tell users don't do that so don't do that yeah just Del the r and then it should work all right so we're going to delete the row now we're going to ask again oh no we're asking for the first time the error never happened yeah it never happens you cut it you cut that right probably not okay what have been visited the last 30 days pretty basic C so far come on you thre beautiful dots come on come on yes that I I'm so done with this wait just trying to again I mean try again all right that's try whatever do we have users that's a very important question that most product managers have to ask themselves yes if it just replied yes it's concise check ship it so if there any chance dear readers and users is there any chance you would believe us if we told you that it was working it was perfect what did we change you were I was messing around I added the ID but that's an INT so poog would have inif that sorry typ cast engineers and co wait look go up project ideas text oh that shouldn't be so much a problem it yeah okay what I'm more interested I thought I just cracked a c the CES always are they different unknown table do we have the right post talk right project if it's unknown table project Ed API key did you tell it don't hallucinate oh we forgot of course we forgot that did you forget actually yeah actually it's not in the prompt that's why you need Apple's expertise in prompt engineering if we had added that if this fixes it if it's sure it fixes that it's like from best practice so last sentence sure we have to shut it in the face in the we do it in Old capitals that would be an interesting content piece Capital scientifically based works better so really I have the feeling it's still not working do you think we should should we start from scratch no how we built it an AI agent in 10 you know it was working I think we even have video evidence let's do something that we already tested that was like which P query Vice most and if we get the max agent executions then there was some kind of regression something yeah then something was really L the question is I would say maybe we fix it before we like 12 hours forget about this contexts and come back and just identify the area of something we have version history in the work for we're on the Enterprise plan yeah a bunch of work I'm just saying if it's really to it's not working Prince quad we have failed and the next time that you see our faces we have unfailed we unfa this kind unfail this [ __ ] okay so all we've done is changed the model from 40 mini to 40 yes because it were stupid give it a little refresh no it's totally broken it's not is it activated go to the flare it is on off you know what's about that question if this works that's not even like a legit question like Pages can't turn okay it's you your solid prediction you would add them okay but this is good so we're getting something so this is good because we have some generic questions where it's helping we want to create a more specific churn or something and we see it's not helping with that so that's great because we know we can create a specific task for that so ask one of the um let's fig how many I think if you just started writing German to it rep in German most likely it will we've actually dat yeah okay so now we are rolling right so it's working on some simple queries so let's see how many Wizards did we have from the USA come on hog Flix which we should it's reasonable it work the same you know we can do tomorrow when we checking that okay it's good the same number post hog some of these queries set up some tables proving this okay so what happened what was broken we made the model picked a better and we had to do not okay so we did two things ultimatives picks the table like sqa table uh which does not exist and then it runs into error and it keeps running into error but we have a UI it's answering some questions correctly not well but that's good we got room to for scope to improve the questions that it doesn't and we have a strategy with more specific sub agent Ty whatever exactly how we do not sure but for one day kind of easy mode hanging out having some snacks but you have to show this basically if you got it like if it's actually has a good run good context then it does its job really well and yeah we can we need to make sure that those queries are more likely to be successful try some those ask which country is user blah blah from it's actually it's Denmark because it's like no but take this and see if it gives you the same like it should be easy I'm saying where is ID from mhm don't get confused you got this for interesting but it knew it's a user ID oh it's already told us oh did it help the signate can you copy this one into the notion that's when we should check cuz that's something it's not in its understanding its context I think it's questions like these we're going to figure out question's getting wrong yeah work back how I thought about that and see if there's a sentence of text of context that helps basically I've I think I've kind of lost count I think it's day 28 of the AI Sprint but in any case what the end of day one of the AI great push for Marcel High we've got the UI in a really good place I'd say for MVP some decent ux there that's all being served by NN which I think is pretty cool we've got a the fallback sort of general knowledge assistant that's handling certain queries well certain queries poorly and queries it's messing up on so what we're going to do tomorrow and what we've been collecting is some of the queries it's doing poorly so we basically have our things to improve this is a presentation and competition what we'll do is we'll hopefully have at least two tasks so we'll have our current task which you saw the demo of it's working well in some ways not so we improve that and hopefully add another task which is more specific so we can have a really impressive specific task and it could just be the churn analysis or just us a segmentation so we show it do one thing really well we show it be able to handle a lot of stuff on a bell curve between well to kind of well I think that with a good ux being all run from n8n is pretty damn good for 2 days from two flow gmers so yeah the AI squad's going to get some well- earned rest and we're going to be back here bright and earlyish at what time 10 a. m. the latest 10:00 a. m. at the latest so what to make breakfast right so we got to be here by like 9:45 don't be late Sprint spad

### [36:43](https://www.youtube.com/watch?v=6SQ56DQZ3hA&t=2203s) Day 2 Start

yeah hey M how you doing fine actually well un rested uh get over sleep seriously yeah I had edited we 3:00 a. m. so on that note I hope you enjoy update 09 cuz I got zero sleep okay it's Sunday it's 10:21 we definitely got to get a 24:00 and so it's T-minus insert an AI voice here way say the time they have my ass in a few edits I literally say something like and then inside your notion workflow I'm looking at notion database it just changed the word but it would be even funnier if it's like such super robotic voice so we got some coffee in uh we had some cant I thought you were eating a pistachio cant turns out it was guamo yes I would have love pachio but you know like you have to take that give r we at so um we had great broken demos I was working the whole day and then kind of bed at the end right which is like shows like this super regular thing with AI it's not deterministic so whatever you put in it could like in some way it will error we figured out that when looking at those arrows it's because the agent which builds like The Craze itself like SQL queries tries to reach some tablet some fields that don't exist M um pretty common for SQL engines so I think Trump adjustment and also enabling the agent to iterate such queries that failed and giving the agent more hints how to fix those wrong Ceres then we should be fine on this level it's like the like as I mentioned lower tier agent I think on the front end everything's done I think I have to check like the settings and stuff there's a few things I could knock that out but that's a predictable thing to do that's going to I just need a 20-minute session get that done so I say we could do that a little later in the day we discussed yesterday about how we want to improve our we got to give it a name that this agent what do we call this dude we don't have the name yet okay this is the found this is the no this is the foundation agent let's say so I think and correct me if your thinking is different on this but we put a lot of our effort into this one basically workflow that mainly an AI agent that can do a pretty good job at taking your question and turning into hog ql or whatever they call it yes if what I could do is do a little domain research on one of these tasks churn analysis one of these and try to create a basically Mega user message with extra context that we feed into this agent yeah so instead of saying hey just do hql we you know we'll start off with it's saying if it's for CH analysis I might have some examples of churn analyses done in HQ well PPE that in this context add a little extra hey do steps one two and three first and then and CU if that works we've got a scalable modular way to add more tasks and I think it's a pretty good example because on a team that's might how it work you might have one person on the team who's an you know Advanced AI engineer working on this like Foundation model and I'm instead doing some more domain specific stuff and feeding it into our engine so I kind of like that as well because well let's see if it works but it's also a way that we could drisk what we're working on I'm working on adding a new task you're working on improving yeah this guy let's say my results don't work where it's not improved we still have an improved AI agent we ship as our foundation one and potentially we get to show this cool pattern of adding extra context and with domain research and statically feeding it in we can get a better result what do you think totally agree I think it's like the best thing that we can do improving what we have existing and you know like for us we also wanted us to have like a little challenge if we just go with this product I you know like it's cool it works but I'm here for something greater like enabling you know like enabling AI to based on the domain knowledge do some research itself because at the moment it's sing a question sing a data point from post talk and form an answer M but I want like several post talk research be done by Ai and then form because I think that is a far more sophisticated thing to do to be able to reason and say hey I'm going to run and this analysis have a look at the results and make an informed opinion that sounds a lot closer I mean I don't think we want to insult data scientists and say if it can do that it's a data scientist but we're stepping in that direction that we would expect from someone who could competently complete that task yeah and yesterday I tried to wrap the lowest agent with mid Lev agent who is doing this kind of research and it worked like a charm did some research but it always also had those cases where the queres wouldn't result in something useful saying the mid-level agent hey I was not able to find data because like es fade think you're very much in the weeds and focused on the brain on the foundation and what that you kind of stay focused on use your to so like another coffee in croissant then get going yes let's get going so we're going to pretend and to cut the sound out and then gesticulating at some noes I just applied my first F tried to give the agent in case of error the original tables and Fields from the SQL that is that are known and it made like the first huge Improvement we see here that it has like this error and in the second request it fixed itself and got like the results so we now have on our first case proper answer maybe you're familiar with this question from demo yesterday no we got the answer yes it's just time to fix other cases video evidence okay it is team minus like 40 minutes until we have to submit the application for the actual contest I'm still working on prompt engineering let's fill this out so what do we need Okay so we've officially decided on Professor Dr scientist we want to let the people know that we're serious and this is a very capable yes y you know you can't go more serious yeah I mean that's like 10 years of schooling right there Max T TK hour kind of f yeah you got this one oh wait what about you want to use a comma one I'm going s fire your data analyst I'm just kidding gr data anal watching anal I don't like the term chatbot yeah assistant I've been using assistant researches by itself based on wait run that through GPT y you are a marketing expert make this better yeah no you uh let's find a Battlefront you are startup founder and you want wec money no hella VC money H hella VC money obv H multiples my draft it's going to be difficult but make it better no not I don't want the full pitch oh no one sentence actually it behaves more like startup funders right just one to pitch wow oh autonomously that's power that's actually super cool because it's also happening actionable insights oh yeah this is got okay we got it D written all over did you I don't think you did cuz I saw crunchy num it says crunch it's kep that so wa wait what it did why yeah it's okay it's got by crunching I like that yeah it's crunch time oh why that's a good name crunch time it's for and then we always call crunch time instead would do like Professor Dr s best Professor Dr thanks for keeping our brand like our if you have a logo okay no we need a logo time to use AI hey guys so it turns out only a certain number of finalists will get to present and out of 20 teams Professor Dr

### [45:52](https://www.youtube.com/watch?v=6SQ56DQZ3hA&t=2752s) The Pitch

scientist has been selected as one of the six in half an hour we St presentations got to work on our pitch that means worst case wear play six right but best case we top one what's surprise again there was like credits for Luma weate I mean we could use term sheet team term sheet oh man all right so I'm Max this is Marcel and we built Professor Dr scientist it's a product analytics AI assistant why my background is in ux and very often on teams or startups that I've been at I felt disenfranchised from the data I work at NN and today we have some very complicated Telemetry that you sometimes have to write like a thousand lines of python to like generate a query that's a bit of an edge case but generally there's a lot of people in an organization that could benefit from the insights from product analytics that can't access it and then the people who do know how to do that get swamped with all these basic queries that not really using their human brain power right they could be focusing on the hard problems so we took on the challenge of could we train an AI agent to understand product Telemetry and be able to turn human language into aggregated insights uh and so that's what we did and so with that thank you marel saved us there and so with that we' created Professor do scientist now the way it's set up is it has a few different tasks that it can do so myself if you can click on auto segment users so the way these tasks are structured we have split our agents into two parts these agents all have contextual domain knowledge on how to do the task they also have an opinion on how the task should be done at a high level this task expects a goal and then it performs a user segmentation analysis on that goal so we want to optimize for pricing this is going to take about 2 minutes to run so meanwhile we'll show you what's happening on the back end I'm here inside n and if I go into the project all the work fls that you see here are powering the front end and the back end if we open up the auto segment agent we can see what this is doing is on a new chat message we grab some of the settings that we need and then we have this analyst assistant and here you can see the system message this is built on top of Lang chain so it's rather similar and we have some specific knowledge here but the magic happens is in this tool which actually can interact with postag and understand that and that's what Marcel worked on so while he opens that up so you understand ouri agent uses that tool process things under the hood and it can think and reason over multiple steps awesome thanks Max so I go into details with this particular agent we are actually nesting agents because we wanted to have like an approach where we have like this Foundation agent which just takes care of fetching the data from post talk right and the agent above that figures out with their state the insight for and purpose and figures out an answer I would love to go more get more into detail but time is running so I hand over to Max again yeah so what's happening if we go back let's see if our sessions run yet if not we had some pre-made ones so if you scroll up so as you can see here we want to optimize for pricing we've identified some user segments and this is all going to be something that we publish publicly so you can run this on your own and end account and stuff so you can check us that we're not mocking this but so this is coming from this specific task since we have 30 seconds if you could swipe to the next tab this is the ask question session so this is a different AI agent it's just a general agent that answers questions as best it can so the other task was a hypers specific one with context this is the fallback one so this one same pattern thanks everyone and you can get NN 50% off with Max 50 cut the C cut the um next Ro stage Applause second place the

### [50:13](https://www.youtube.com/watch?v=6SQ56DQZ3hA&t=3013s) The Judges’ Verdict

place second place the prices €300 in credits for Mis D and Yuma Ai and to hand over this priz I would ask Lenny on stage one of our sponsors and an announce I have to announce otherwise it's weird when I talk about it know I will do can you still come to Stage don't show it okay don't show it this professor Dr yeah um congrats guys we loved sort of how to the point your project was you built it out so quickly the demo worked well you sat here you pitched it in such an exciting way everybody was down for it seems like something profoundly useful for a lot of people and you built it that quickly great job so yeah please okay last

### [51:35](https://www.youtube.com/watch?v=6SQ56DQZ3hA&t=3095s) Team Reaction

least wi whoa so like I don't know about you but I was mentally I was like look not going to win it's called what is it it's called Professor do yeah Professor dror scientist if we ever forgot Mama we made it I'm going be so proud I um so do we get like VC funded now and how does this work I've never want hackathon I'm not I've never participated where I cannot participate in any other hackathons ever it could bring my average down yeah exactly I wouldn't have thought that honestly guys here let's walk and talk as we do Sprint way so guys we were the only flow gramers there right everyone El was everyone else was like okay we need to code that CH we need to NY back end we need to use next JS even the front end we did like this is not like look I don't think our Enterprise sales team is going to recommend our Enterprise customers to do what we did for the front end why I think hackathons is where you show you push tools because sometimes in PR you got to push as well [ __ ] happens yeah we showed what you can do and there was like remember some of the queries that's when I really started getting impressed when I was actually in science I think sometimes oh well look guys it's generating some characters it's impressive for what it is today and you always have the as like for what it is today there's things in there that i' I've been in a lot of rooms where we have these kinds of discussions that would be a legitimate suggestion that someone of some level of seniority would put up their hand and suggest in a room based on looking at data and that's what our professor Dr scientist did yeah we had credits I mean we for sure could use them and Luma I mean know can you know I level up this little walking and talking vlogging game yeah and um I hope they mistal threw in a shirt I wouldn't mind a mistal shirt o feel like it's one of those companies it's hard to get swag yeah guys Honestly though as part of this and I want to say this cuz like this is day 28 or 29 I'm not sure like I'm exhausted but because I made a public commitment to do this and then the love that I was getting first was a public commitment but then getting the love from people so I don't think I would have pushed myself this far if it wasn't the fact with doing this in public getting feedback getting people like what about this cuz it was people kind of challenged me what about this and pushing which was what kind of I don't know if I would have agreed to be like yes let's commit to building a data analyst would you have thought 30 days ago planning this [ __ ] that at the end of the month you're are winning and heckin or kind of winning like for me I consider considered a win second place I mean but the Winner's really cool product yeah it's the kind of product where if I had if I was a guy with money I'd be like hey guys do you need pre maybe like I don't really know but we everyone wants to see that as app because it's has such uity and I think did want an AI hackathon without being just you know like an AI product it utilizes a so it wasn't just so look cuz that's what I thought a critique of our product a little bit was like let's replace human with AI it's kind of like a Trope they did cool but hey man our TR worked and we're going to have to probably clean it up and stuff for releas what we want you guys to see cuz there a lot of interesting patterns I learn a lot from you and stuff maybe we even do later a video where we go over stuff but we'll figure that all out we're going to go have some beers but marel I wanted to say like this was your idea I wouldn't be here right now I wouldn't be the winner of this I would to have this expence thank you for it was such a good experience you know working with you working as team we had just a great time right we were not here for the competition we just we wanted to challenge for us no and it was challenging I was bed a few points you know what theel I think this was a fun time not the last time we hacked together oh yeah for sure why that so much awesome all right well we're going to go have some beers I think we earned it yes catch you on the next one byebye yeah

---
*Источник: https://ekstraktznaniy.ru/video/15583*