Тёмный

Building adaptive RAG from scratch with Command-R 

LangChain
Подписаться 56 тыс.
Просмотров 13 тыс.
50% 1

Adaptive-RAG (@SoyeongJeong97 et al) is a recent paper that combines (1) query analysis and (2) iterative answer construction to seamlessly handle queries of differing complexity. We took at stab at implementing some of these ideas from scratch using LangGraph and @cohere's Command-R, a lightweight (35b parameter), open-weight, fast LLM with strong tool-use and RAG performance.
Code and video below, showing how to use Command-R for query analysis (re-writing and routing) as well as RAG and fast in-the-loop unit tests for document relevance, hallucinations, and answer quality. Our demo will route queries between a vectorstore, web search, and fallback to LLM generations based on the question; it will also iteratively grade responses.
LangSmith traces show that all these steps can be done in a few seconds:
smith.langchai...
Code:
github.com/lan...

Опубликовано:

 

13 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 24   
@chrisogonas
@chrisogonas 5 месяцев назад
Well illustrated! Thanks for sharing.
@sinayagubi8805
@sinayagubi8805 5 месяцев назад
Thanks for explaining it so well.
@octopusfinds
@octopusfinds 5 месяцев назад
Thank you, We love Cohere!
@insitegd7483
@insitegd7483 5 месяцев назад
Thank you, it is very useful.
@gw1284
@gw1284 2 месяца назад
thank you for a great tutorial, learn a lot! How did you record the video. Thanks again
@woojay
@woojay 5 месяцев назад
Fantastic. Thank you.
@jarad4621
@jarad4621 4 месяца назад
Please tell me what handwritten process flow design tool you use for those colour images
@resoluation345
@resoluation345 11 дней назад
Can I ask why did you use tool_use to choose between web_search ? You can just use with_structured_output then ? Because all you did was to get out a string representing the method to use, which you already done many times with with_structured_output, i think the use of tool_use to choose between options was quite excessive or did you want to show another approach to do that?
@alonsosilva
@alonsosilva 5 месяцев назад
Thank you for sharing. At the end of the video, it's mentioned that you can run Command-R with Ollama but if I understand correctly "withStructuredOutput" is not yet implemented for Ollama. How do you use "withStructuredOutput" with Ollama? Thank you.
@SashaBaych
@SashaBaych 4 месяца назад
Lance thank you so much for this incredibly useful tutorial! Guys, can somebody please clarify what would be the difference between just invoking the model with binded tools as opposed to using create_tool_calling_agent method and then running AgentExecutor? Especially in the context of the langgraph. I see so many tutorials on langgraph but only few of them use AgentExecutors. Do I even need to use AgentExecutors with langgraph at all? What is the difference?
@mori-hosseini
@mori-hosseini 5 месяцев назад
Awesome
@arjungoalset8442
@arjungoalset8442 5 месяцев назад
Hell yea
@ukituki
@ukituki 5 месяцев назад
Wake up, babe. Someone has just invented DSPy’s assertions and suggestions 😉
@Slimshady68356
@Slimshady68356 4 месяца назад
whats that
@jarad4621
@jarad4621 4 месяца назад
What's that
@andrybratun7064
@andrybratun7064 5 месяцев назад
I do not see grade_documents after web_search. Seems after web_search it directly goes to generate. Is it expected?
@tharshan09
@tharshan09 5 месяцев назад
What is used to create the illustration? They are really nice style
@NirantK
@NirantK 5 месяцев назад
Excalidraw
@choiswimmer
@choiswimmer 5 месяцев назад
Is this suppose to tie in with the command r+ release?
@SashaBaych
@SashaBaych 4 месяца назад
By the way, how would i make the StateGraph persistent?
@andreas_bergstrom
@andreas_bergstrom 5 месяцев назад
What recording software is that? Seems pretty lightweight, except that it records its own timer…
@Slimshady68356
@Slimshady68356 5 месяцев назад
I assume he is using loom
@andreas_bergstrom
@andreas_bergstrom 5 месяцев назад
@@Slimshady68356 thanks!
@Slimshady68356
@Slimshady68356 4 месяца назад
​@@andreas_bergstromnp
Далее
Building long context RAG with RAPTOR from scratch
21:30
Аушев, Путин, «пощечина»
00:56
Просмотров 803 тыс.
This RAG AI Agent with n8n + Supabase is the Real Deal
16:27
Cohere's Command-R a Strong New Model for RAG
11:44
Просмотров 15 тыс.
Reliable, fully local RAG agents with LLaMA3
21:19
Просмотров 111 тыс.
Agentic RAG: Make Chatting with Docs Smarter
16:11
Просмотров 14 тыс.
RAG from Scratch without any Frameworks
11:21
Просмотров 20 тыс.