Slide 1

Slide 1 text

AI Agent Practical Intensive Course AI Agent Lightning Talks June 7, 2025

Slide 2

Slide 2 text

How to build, deploy a RAG application using langgraph (on Cloud Run with Streamlit) Yuta Tokia

Slide 3

Slide 3 text

Objective ・Learn concepts, related components, and tips for building, deploying a RAG application on VertexAI.

Slide 4

Slide 4 text

Module agenda ● How combine your data with the LLMs ● Use case : Proposal system ● Tips1 : Metadata Filtering ● Tips2 : Store vector store in GCS ● Explore demo!

Slide 5

Slide 5 text

How combine your data with the LLMs? RAG 1. R(Retrieval) : search for relevant data from vector databases 2. A(Augmented) : add it to the prompt context 3. G(Generation) : for use in Gen AI Add external data to the LLMs! Can answer questions about specific source information.

Slide 6

Slide 6 text

Use Case : Proposal System AI Branch Head office Person in charge Departments ①Propose ideas for works ②Checking , Allocating ③Answer Use AI agent Staff

Slide 7

Slide 7 text

Use Case : Proposal System AI Tasks 1. Is this one a duplicate? 2. Which department should handle it? Use Langgraph for orchestration!

Slide 8

Slide 8 text

class GraphState(BaseModel): query : str = Field(..., description = "ユーザーからのクエリー") category : str = Field(..., description = "提案、要望のカテゴリー") generation: Optional[str] = None documents: List[str] = Field(default_factory=list) duplicate_NO: Optional[int] = None duplicate_documents: Optional[str] = None duplicate_reason: List[str] = Field(default_factory=list) responsible_departments: List[str] = Field(default_factory=list) responsible_reason: List[str] = Field(default_factory=list) referenced_No: Optional[int] = None Using Langgraph… Can build fully customizable agent workflows

Slide 9

Slide 9 text

Tips1 Applying Metadata Filtering(Chroma) ・Chroma supports filtering queries by metadata. def _retrieve(self, state : GraphState) -> dict[str, Any]: documents = retriever.invoke(state.query, filter = {“カテゴリー ” : {“$eq” : state.category}} ) Return {“documents” : format_docs(documents)}

Slide 10

Slide 10 text

Tips2 : Store vector store in GCS Keep the vector store up-to-date! Easy to operate! Container(CI/CD)? blob? or

Slide 11

Slide 11 text

Let’s explore demo!

Slide 12

Slide 12 text

Thank you so much!