When to use Prompt Chains. DITCHING LangChain. ALL HAIL Claude 3.5 Sonnet

  Рет қаралды 23,188

IndyDevDan

IndyDevDan

Күн бұрын

Пікірлер: 82
@Canna_Science_and_Technology
@Canna_Science_and_Technology 3 ай бұрын
I am anti black box solutions. I’ve written my agentic framework from scratch and the month of coding and headaches was worth it. I learned a ton and having full control over everything is priceless. It works so well, it’s almost scary. ;-)
@AAL3087
@AAL3087 3 ай бұрын
Care to share your learnings. I'm about to dive in to do the same. Cheers
@Canna_Science_and_Technology
@Canna_Science_and_Technology 3 ай бұрын
I restarted from scratch a couple of times because I was confident but kept forgetting things, leading to many big changes. Planning in detail and creating pseudocode is crucial. I didn’t follow any agentic framework, preferring to build from scratch, but later realized other good ideas exist. The complexity of using a state machine for flow control was a bit daunting. I ended up using a hybrid approach, which worked out. Code everything in modular steps-memory, tools, agents, departments, managers, etc. I even created a secretary to manage memory and task completion, which worked perfectly. And ChatGPT will slow you down. I got so frustrated with ChatGPT, I ended up just coding it mostly myself.
@AAL3087
@AAL3087 3 ай бұрын
@@Canna_Science_and_Technology hey thanks! that is invaluable to know. Were there good libs, patterns etc you did retain e.g. Memgpt or others. What's a good way in hindsight to this again?
@flexibleaspect
@flexibleaspect 3 ай бұрын
I'm a newb... what are you writing your own agentic frameworks for? Is each framework a tool to solve a specific problem, then you make another one to solve another problem... or does the latest framework replace all that came before?
@u.a3
@u.a3 3 ай бұрын
Are you solely building for yourself or taking on client projects as well? What did you build your framework for? Like what sort of tasks
@jaredcluff5105
@jaredcluff5105 3 ай бұрын
I appreciate this. I am working on a new project that will leverage Mixture of Agents and was looking at which framework to use. I think you have convinced me to write and manage my own simple agentic framework instead.
@indydevdan
@indydevdan 3 ай бұрын
This is the way - you will have 100% control here and if some wrapper/library pops up that you want to use in the future, you'll likely have a much better idea of what it does having built your own.
@davieslacker
@davieslacker 3 ай бұрын
Thanks for a very straight forward agentic workflow example without unnecessary libraries. This was what I have been looking for. I have felt like one could make a full time job simply studying langchain and seems like a level of abstraction of focus outside of the code. I want to dig straight into the models.
@indydevdan
@indydevdan 3 ай бұрын
Reading your comment made me think: Langchain is starting to look like the Reactjs for the GenAI space. You will find work and can build a contracting career out of it 👍 but you will know there's better/easier ways to do thing X or Y 👎. Your idea to dig straight into the model is spot on.
@larsfaye292
@larsfaye292 3 ай бұрын
I love that you use the SynthWave '84 theme with text glow. Best theme in existence!
@flexibleaspect
@flexibleaspect 3 ай бұрын
I hadn't heard of it, but looked it up and will have to try it. Looks cool.
@indydevdan
@indydevdan 3 ай бұрын
my fav theme by far
@bukitsorrento
@bukitsorrento 3 ай бұрын
I was waiting for your video.. Thank you for this. Got couple of questions. 1. For nocoders, I really like langflow, it's pure python, visual programming always help speed up everything, not dependent on Langchain although they started as their wrapper. I need your opinion. 2. Agentic workflow should work cross platform, orchestrating cloud, desktop and mobile, also be industry agnostic. 3. I want to propose a discord server for IndyDev community, it's really hard to reach you but we all want to discuss the "journey".
@JoshDingus
@JoshDingus 3 ай бұрын
I was just thinking this as well. Dude your stuff is gold, I think it would help grow your community for sure.
@indydevdan
@indydevdan 3 ай бұрын
1. langflow looks solid but heavy. If you're a non-coder it's a great option. At a glance I can see they expose a lot of the key functionality of llms data retrievers, etc via the ui. 2. If that's your use case then yes. Your agentic workflow really only has 1 duty: solve your problem. 3. Discords are great but have several issues. Still thinking through this stay tuned.
@jackbauer322
@jackbauer322 3 ай бұрын
I am pro black box solutions. As long as the results is acceptable regarding MY TASKS and criteria, nothing else really matters
@KhalilKhamlichi-yn5wn
@KhalilKhamlichi-yn5wn 3 ай бұрын
I like your approach, can you make a tutorial also for DSPy ?
@gheatza
@gheatza 3 ай бұрын
very interesting, thank you! I am a noobie that watches these kinds of videos from time to time to try and understand this tech and what I could build with them for myself. setting that aside, I hope I'm not the weird person here but I really like the way your keyboard sounds 😆
@TheBestgoku
@TheBestgoku 3 ай бұрын
I donno what it is, maybe its some kind of placebo or something. But claude sonnet 3.5 feels soo much better than even chatgpt 4o. I feel like i can actually see this as a mini AGI already.
@jaredcluff5105
@jaredcluff5105 3 ай бұрын
It’s not placebo. It is better. I subscribe to both and now use gpt4o for the “simple stuff” to save tokens I will need with Sonnet as I have frequently exhausted them.
@indydevdan
@indydevdan 3 ай бұрын
I agree but it won't last long. I call them the BIG 3. Anthropic, OpenAI, and Google. They will swap first place over the next year or two until someone cracks AGI. Based on rumors, GPT-5 is going to break the internet but we all know Anthorpic and Google are cooking as well.
@pioscelina6800
@pioscelina6800 3 ай бұрын
I don’t get why people would use langchain. There are tons of much better alternatives. Personally I use Wordware where I can just create agent if workflows by writing prompt in English and then connect it via API to main product. Super simple, without unnecessary abstraction layers
@indydevdan
@indydevdan 3 ай бұрын
Looks interesting thx for the tip and I agree w/you.
@asdasdasd505
@asdasdasd505 20 күн бұрын
Hi, thank you for sharing your ideas, i find them very inspiring. I have a big question: does your code makes a single call to the model, and then the input variables and the logic, are "loaded" into the model with the prompt? Or you make multiple calls? (i'm far behind your coding skills, i've seen the code from the repo but it's gonna take me for ever to understand it). Because i get the same result using llama3.1 8B on my 16GB mac by simply crafting the prompt and making one call to the model. I get the correct result in JSON format 100% of the times. Of course i couldnt make it understand {output[-1]} llama simply ignore it, but still , by composing a single final prompt with multiple instruction-intermediate steps, where each instruction reference the result of the previous step, it's been working great so far. I'm pretty sure i'm missing something here, maybe my tasks are too simple?
@cholst1
@cholst1 3 ай бұрын
Dno if youve noticed, but the API for Claude 3.5 says its knowledge cutoff is 2022, wheras the one one claude page says april 2024. Wonder why they have different models on the API.
@medoeldin
@medoeldin Ай бұрын
When you do a prompt chain is it possible to bring in the entire prior context from multiple past prompts as opposed to just the output from the prior prompt?
@tomtom5821
@tomtom5821 3 ай бұрын
Thank you so much! Your videos are extremely concise and impactful. I am very new to programming but I work full time as a data analyst and would love to learn more about software development so that I can offer AI agent frameworks or consulting to businesses. I just need a good personal project to start implementing and I'm having a tough time figuring out what to do.
@ronilevarez901
@ronilevarez901 3 ай бұрын
Draw me a lamb.
@jeanchindeko5477
@jeanchindeko5477 3 ай бұрын
Basically you’re rebuilding the core piece of all those libraries from scratch, right?
@indydevdan
@indydevdan 3 ай бұрын
The idea is to rebuild the pieces of those libraries that matter for your use case in a simplistic, single purpose, reusable way. So yes and no.
@free_thinker4958
@free_thinker4958 3 ай бұрын
I think that approach will be suitable for people who wants to be spicialized in ai development and deployment, personally speaking i won't waste all that time to build that from scratch because it's better for me to focus on my online business logic rather than wasting my time reiventing the wheel.
@indydevdan
@indydevdan 2 ай бұрын
Solid take but to be fair: writing one helpful prompt chaining method that's highly reusable is not exactly reinventing the wheel.
@MavVRX
@MavVRX 3 ай бұрын
Langchain is very customisable, and you can pick and choose what to use and what not to use. I was able to reduce a lot of unnecessary code when implementing a white paper for a different type of agent that uses a different parsing method.
@littledovecitydust
@littledovecitydust Ай бұрын
where do you sell your agents, may I ask?
@alexm.9260
@alexm.9260 8 күн бұрын
Can this be used to create long form content documents such as ebooks or things like that? Prompt chaining to add content when the output of ai is limited to maybe 1500 words per output
@Dis-Trackted
@Dis-Trackted 3 ай бұрын
Cool video. I'll check the detailed implementation :)
@DeanRie
@DeanRie 3 ай бұрын
Thanks for video, you are is super cool! 🙏
@ibbbyscode
@ibbbyscode 3 ай бұрын
This is great material Dan. More of this please 🙏🏾
@eyoo369
@eyoo369 3 ай бұрын
Whats the benefit of splitting that task into 3 separate prompts as opposed to directly prompting for a title, hook and blog post in one shot?
@Damion00000
@Damion00000 3 ай бұрын
You are aiming all of the resources of the model at solving one problem , rather than dividing it across three problems. This has the potential of creating a better quality output than if you said do all three. I begin all my writing tasks by prompting for outlines , and then I use each point in the outline as a prompt to produce a paragraph outline , I could go deeper and ask for sentence outlines as well - it all depends on how much control you want from the outputs .
@valtersilva5386
@valtersilva5386 3 ай бұрын
Awesome work mate. Similar to fabric.
@remsee1608
@remsee1608 3 ай бұрын
I agree always raw dawg prompts
@indydevdan
@indydevdan 3 ай бұрын
100% raw dawging prompts for production work the foreseeable future. I think a comparison video will be interesting though langchain vs autogen vs raw dawg.
@obsolete9121
@obsolete9121 2 ай бұрын
you need to isolate microphone from your desk
@CourageToGroww
@CourageToGroww 3 ай бұрын
why 🐍 and not 🔥 ?
@BenQ.-ys4kp
@BenQ.-ys4kp 3 ай бұрын
What language is that
@CourageToGroww
@CourageToGroww 3 ай бұрын
@@BenQ.-ys4kp "Mojo is designed as a superset of Python. So if you know Python, then a lot of Mojo code will look familiar. However, Mojo is-first and foremost-designed for high-performance systems programming, with features like strong type checking, memory safety, next-generation compiler technologies, and more. As such, Mojo also has a lot in common with languages like C++ and Rust. Yet, we've designed Mojo to be flexible, so you can incrementally adopt systems-programming features like strong type checking as you see fit-Mojo does not require strong type checking."
@Hex0dus
@Hex0dus 3 ай бұрын
What do you mean by the fire emoji? I came up with PyTorch, Scala or Firebase but that doesen't make sense at all...
@CourageToGroww
@CourageToGroww 3 ай бұрын
@@Hex0dus Mojo 🔥 - the programming language for all AI developers Mojo combines the usability of Python with the performance of C, unlocking unparalleled programmability of AI hardware and extensibility of AI models.
@itskittyme
@itskittyme 3 ай бұрын
i entirely agree with your take when you say it's too early to use these libraries, because we are at the start of this new age of prompt engineering and these libraries force you to use patterns that have not been tested and engineered properly yet, I can only recommend everyone to try things out yourself because you may stumble upon better patterns by trial and error, at this stage of the technology
@jeanchindeko5477
@jeanchindeko5477 3 ай бұрын
All that great and is true not just for LLM but in any programming paradigm, languages, patterns, you should learn to use the low level API. That said in corporate situations when you’re asked to build a POC, Demo, MVP in 2 weeks, you don’t have the luxury to take 1 month of trial and error learning process to deliver something to your boss. So just saying to not use libraries is not fully all time applicable.
@brandonwinston
@brandonwinston 3 ай бұрын
I see your point but its not for me. I'm a developer, but I'm also a professional in another discipline, and that is the focus of my dev work. Would rather spend more of my limited time on business logic rather than trying to reinvent langchain, which I don't find hard to use or understand.
@dprggrmr
@dprggrmr 3 ай бұрын
Well, you're trying to use langchain to reinvent development...you'll be stuck
@indydevdan
@indydevdan 3 ай бұрын
Totally fair take. Again I'm not against langchain. If you don't have time and/or are not building out super specific use cases these libraries will get most of the value for free UP TO A POINT. The biggest risk is letting a library prompt for you. To me this would be a massive mistake.
@tomaszzielinski4521
@tomaszzielinski4521 3 ай бұрын
LangChain is, as name suggests, a promp chain framework. I write all the prompts from scratch, no idea where are you coming from. The only "library promp" I use is pydantic output formatting, which works flawlessly for various models. Agree about too many levels of abstractions, but I do things in my own way, anyway. Ended up with very similiar function to what you show here.
@viky2002
@viky2002 3 ай бұрын
gpt instructor for the win
@wellbishop
@wellbishop 3 ай бұрын
Pure gold as always! Thank you so much.
@93cutty
@93cutty 3 ай бұрын
Saving this til I get to work. I have been waiting to see if you release something about this :)
@teddyfulk
@teddyfulk 3 ай бұрын
Why not use instructor?
@indydevdan
@indydevdan 3 ай бұрын
Instructor is solid - may include in future videos.
@joshualunati4105
@joshualunati4105 3 ай бұрын
Heay brudda, Just wanted to say that this has to be one of the most educational video about this subject , in quite some time. Thank you for your time.
@indydevdan
@indydevdan 2 ай бұрын
Glad it was helpful!
@ScullyPop
@ScullyPop 3 ай бұрын
This is so interesting. It's very complicated, but I will try to wrap my head around it.
@siegeperilous9371
@siegeperilous9371 3 ай бұрын
premature abstractions.. oops I abstracted. I swear that never happens. Lolol good shit. Clear. Simple. Powerful. Appreciated, brother.
@ProzacgodAI
@ProzacgodAI 3 ай бұрын
Hey, I like this, it's more my speed. I had tooling that's basically the same as you have above. The biggest differences from what I can tell, in your prompts = [] ... instead of just raw strings I was using classes to describe the 'meta' around the prompt like JSON("generate blog post title about ...."), TEXT("generate one hook for ...."), these were just factory wrappers to a Meta(prompt, returnType, ctx) where ctx could also be set explicitly, I kinda rarely did that though. The second biggest was because I knew it was supposed to be json in the return, I could retry the prompt right in the chain lib, masking some % of errors so I didn't have to deal with them high level. I mean failure cases do get through, but failing to encode in json was generally not one of them.
@asycd_
@asycd_ 3 ай бұрын
Spot on about not needing Langchain but it gets you through the door. Especially, with the tricker methods to implement like LLM graphs!
@DARKSXIDE
@DARKSXIDE 3 ай бұрын
dope work and insight i found the same issue w autogen, crew ai etc.
@the42nd
@the42nd 3 ай бұрын
Excellent video and code. Subscribed.
@tollington9414
@tollington9414 3 ай бұрын
The captions are really annoying- please don’t use them, YT has this function already
@tollington9414
@tollington9414 3 ай бұрын
Ok they don’t last long ❤
@SwaLi440
@SwaLi440 3 ай бұрын
NIIIIIIICCCEEEE!!!!! Tring IT!
@amrohendawi6007
@amrohendawi6007 3 ай бұрын
You are literally reinventing the wheel
@cholst1
@cholst1 3 ай бұрын
Bold to assume that the general shape of an agent framework is as agreed upon as wheels being circles. As for development, we are still developing and improving wheels to this day. So your point is quite silly.
@indydevdan
@indydevdan 3 ай бұрын
There isn't a wheel to reinvent yet. You're assuming LangChain or these other libraries are 'the wheel'. The 'wheel' doesn't exist yet, it's too early. These all rough approximations which is why it's important to stay close to the metal (prompt)
@vitalis
@vitalis 3 ай бұрын
Not a programmer but this was easy to follow. Great clear video. What about the memory part? I have been doing research on all the AI terms because there is so much overlapping usage. I wanted to find out the process and tools people were leveraging to produce what are essentially ChatGPT wrappers but customised to a particular industry or user case. Agents, chain prompts, agentic flows, multi agents, vector databases, RAG, permanent memory, cache memory, context prompting, fine-tuning, user input, automation, etc
@khankrishna
@khankrishna 3 ай бұрын
Thanks brother, really underrated job you're doing here
@ronanhughes8506
@ronanhughes8506 3 ай бұрын
Very hard to follow. Speaking too fast and dark screen makes it hard to see.
@SR-ud2xj
@SR-ud2xj 3 ай бұрын
The source code is available, you can zoom, alter playback speed, use transcript etc. if you ask nicely maybe he can write it for you personally on your machine? Imo you are being just a little picky and not objective . Many llms can help you break down this video. You could prompt them for example, “what is the main purpose of this video”, “given the main objective of the video what are the ten key take aways?” And “taking each take away in turn, expand each point to explain to a newb, exactly what is going on. For each take away state the takeaway you are on and the remaining ones to cover”, “taking each take away one at at time , create four scenarios with 6 multiple choice questions each to assess understanding. There should be four possible answers for each question and you must provide feedback for each option to explain why it is either correct or not”……..
когда не обедаешь в школе // EVA mash
00:57
EVA mash
Рет қаралды 3,3 МЛН
Крутой фокус + секрет! #shorts
00:10
Роман Magic
Рет қаралды 19 МЛН
escape in roblox in real life
00:13
Kan Andrey
Рет қаралды 88 МЛН
Пришёл к другу на ночёвку 😂
01:00
Cadrol&Fatich
Рет қаралды 11 МЛН
Why Agent Frameworks Will Fail (and what to use instead)
19:21
Dave Ebbelaar
Рет қаралды 65 М.
Complete DSPy Tutorial - Master LLM Prompt Programming in 8 amazing examples!
34:42
Neural Breakdown with AVB
Рет қаралды 18 М.
15 INSANE Use Cases for NEW Claude Sonnet 3.5! (Outperforms GPT-4o)
28:54
When Claude 3.5 Sonnet Became The Better Chatbot
11:46
bycloud
Рет қаралды 43 М.
Reliable, fully local RAG agents with LLaMA3.2-3b
31:04
LangChain
Рет қаралды 16 М.
когда не обедаешь в школе // EVA mash
00:57
EVA mash
Рет қаралды 3,3 МЛН