Slide 1

Slide 1 text

Try Both and Choose Your Side: Chatbot Development with .NET vs LangChain Kardel Rüveyda ÇETİN

Slide 2

Slide 2 text

2023- YILDIZ TECHNICAL UNIVERSİTY Mathematical Engineering (Licentiate Degree) YILDIZ TECHNICAL UNIVERSİTY Computer Engineering/IT (Master's Degree (Non-Thesis)) 2013-2018 2019-2020 YILDIZ TECHNICAL UNIVERSİTY Mathematical Engineering (Master's Degree (Thesis)) 2021-.. DOĞUŞ TEKNOLOJİ Software Support Asistant Specialist Software Asistant Specialist Software Specialist 2018-2021 KARİYER.NET Software Specialist Senior Software Specialist Expert Software Engineer Mavi (2016) Overtech (2017) INTERNSHIPS Junior Frontend Developer 2018 ICONEC WAVE X: @kardelanite in: kardelruveydacetin

Slide 3

Slide 3 text

What Is Our Goal? LLM RAG LangChain Bonus: LangGraph .NET OpenAI API Which One Would You Choose? Agenda

Slide 4

Slide 4 text

What Is Our Goal?

Slide 5

Slide 5 text

LLM VS

Slide 6

Slide 6 text

RAG

Slide 7

Slide 7 text

LangChain level of difficulty

Slide 8

Slide 8 text

No content

Slide 9

Slide 9 text

Project Structure

Slide 10

Slide 10 text

LangChain Necessary Installations python-dotenv pandas langchain langchain-core langchain-openai langchain- community beautifulsoup4 faiss-cpu datasets streamlit

Slide 11

Slide 11 text

For Rag Document Preparation

Slide 12

Slide 12 text

Use VectorStore Chroma,Faiss etc. 1 2

Slide 13

Slide 13 text

Use VectorStore Chroma,Faiss etc. 3

Slide 14

Slide 14 text

Choose LLM

Slide 15

Slide 15 text

Prompt Engineering

Slide 16

Slide 16 text

Create Chain

Slide 17

Slide 17 text

D E M O

Slide 18

Slide 18 text

RESOURCES

Slide 19

Slide 19 text

Bonus: LangGraph level of difficulty

Slide 20

Slide 20 text

No content

Slide 21

Slide 21 text

Project Structure

Slide 22

Slide 22 text

LangGraph Necessary Installations langchain==0.2.7 langgraph==0.1.8 langchainhub==0.1.20 langchain-community==0.2.7 tavily-python==0.3.4 langchain-chroma==0.1.2 python-dotenv==1.0.1 pytest==8.2.2 langchain-openai==0.1.16 altair<5 streamlit==1.37.0

Slide 23

Slide 23 text

CHAINS

Slide 24

Slide 24 text

Prepare data for ingestion

Slide 25

Slide 25 text

graph / ingestion.py 1

Slide 26

Slide 26 text

graph / ingestion.py 2

Slide 27

Slide 27 text

No content

Slide 28

Slide 28 text

graph/chains/router.py

Slide 29

Slide 29 text

graph/chains/retrieval_grader.py

Slide 30

Slide 30 text

graph/chains/retrieval_grader.py

Slide 31

Slide 31 text

graph/chains/generation.py

Slide 32

Slide 32 text

graph/chains/generation.py

Slide 33

Slide 33 text

LangSmith Hub

Slide 34

Slide 34 text

graph/chains/hallucination_grader.py

Slide 35

Slide 35 text

graph/chains/hallucination_grader.py

Slide 36

Slide 36 text

graph/chains/answer_grader.py

Slide 37

Slide 37 text

graph/chains/answer_grader.py

Slide 38

Slide 38 text

Summary/nodes/GraphState

Slide 39

Slide 39 text

Summary/Graph Structure 1 2 get_graph().draw_mermaid_png (output_file_path="graph.png")

Slide 40

Slide 40 text

D E M O

Slide 41

Slide 41 text

RESOURCES

Slide 42

Slide 42 text

RESOURCES(Academic) Corrective Retrieval Augmented Generation Adaptive-RAG: Learning to Adapt Retrieval- Augmented Large Language Models through Question Complexity Self-RAG: Learning to Retrieve, Generate, and Critique through Self-Reflection

Slide 43

Slide 43 text

.NET OpenAI API level of difficulty

Slide 44

Slide 44 text

START Welcome System Message (From Frontend) What does it mean to cry in a dream? About Dream? DON’T ANSWER ANSWER DREAM MEANING YES NO

Slide 45

Slide 45 text

Project Structure

Slide 46

Slide 46 text

DreamController.cs

Slide 47

Slide 47 text

DreamInterpretationService.cs 1

Slide 48

Slide 48 text

DreamInterpretationService.cs 2

Slide 49

Slide 49 text

3 4 5

Slide 50

Slide 50 text

6

Slide 51

Slide 51 text

D E M O

Slide 52

Slide 52 text

RESOURCES

Slide 53

Slide 53 text

No content