File size: 4,815 Bytes
4a51346
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
{
 "cells": [
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## ์šฐ๋ฆฌ๊ฐ€ ๋ฌด์–ผ ํ•˜๋Š”๊ฐ€"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "์™€์ธ์— ๋Œ€ํ•œ ์ง€์‹์ด ์—†๋Š” ์‚ฌ๋žŒ๋„ ์™€์ธ์„ ์‰ฝ๊ฒŒ ์ฆ๊ธธ ์ˆ˜ ์žˆ๋„๋ก ๊ฐœ์ธ์˜ ์™€์ธ ๊ตฌ๋งค์™€ ์„ฑํ–ฅํŒŒ์•…์„ ๋•๊ณ , ์ถ”์ฒœ๋ฐ›์€ ์™€์ธ์„ ๊ตฌํ•  ์ˆ˜ ์žˆ๋Š” ๊ฐ€์žฅ ๊ฐ€๊นŒ์šด ๋งค์žฅ์˜ ์ •๋ณด ์ œ๊ณต. "
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## ์šฐ๋ฆฌ ์ œํ’ˆ์˜ ๊ธฐ๋Šฅ\n",
    "1. ์™€์ธ ์ถ”์ฒœ: ์‚ฌ์šฉ์ž์˜ ์„ฑํ–ฅ์„ ํŒŒ์•…ํ•˜๊ณ , ์ ์ ˆํ•œ ์™€์ธ์„ ์ถ”์ฒœํ•œ๋‹ค. ํ•œ๊ตญ๋‚ด์—์„œ ๊ตฌ๋งคํ•  ์ˆ˜ ์žˆ๋Š” ์™€์ธ์„ ์ถ”์ฒœํ•˜๊ณ , ๊ตฌ๋งค ๋งํฌ ์ œ๊ณต์„ ๋ชฉํ‘œ๋กœ ํ•œ๋‹ค.\n",
    "2. ์™€์ธ Q&A: ์‚ฌ์šฉ์ž๊ฐ€ ์งˆ๋ฌธ์„ ํ•˜๋ฉด ๊ทธ์— ์ ์ ˆํ•œ ์ •๋ณด๋ฅผ ์ œ๊ณตํ•œ๋‹ค.\n",
    "3. ์™€์ธ๋ฐ” ์ถ”์ฒœ: ์‚ฌ์šฉ์ž์˜ ์ƒํ™ฉ, ์œ„์น˜ ๋“ฑ์— ๋”ฐ๋ผ์„œ ์ ์ ˆํ•œ ์™€์ธ๋ฐ”๋ฅผ ์ถ”์ฒœํ•œ๋‹ค."
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "๋น ๋ฅธ ์ œํ’ˆ ๊ฐœ๋ฐœ์„ ์œ„ํ•ด [Langchain](https://github.com/hwchase17/langchain)์„ ์‚ฌ์šฉํ•œ๋‹ค. Langchain์€ ์–ธ์–ด ๋ชจ๋ธ์„ ์‚ฌ์šฉํ•˜๋Š” ์ œํ’ˆ ๊ฐœ๋ฐœ์— ๋„์›€์„ ์ฃผ๋Š” ํ”„๋ ˆ์ž„์›Œํฌ์ด๋‹ค.\n",
    "\n",
    "### ์•„๋ž˜๋Š” Langchain ํ•™์Šต ์ž๋ฃŒ\n",
    "๋จผ์ € deeplearning AI ๊ฐ•์˜๋ฅผ ๋“ฃ๊ณ , documentation์˜ Quickstart์™€ Modules๋ถ€๋ถ„์„ ์ฒœ์ฒœํžˆ ๋”ฐ๋ผ๊ฐ€ ๋ณด๋Š” ๊ฒƒ์„ ์ถ”์ฒœํ•œ๋‹ค.\n",
    "- documentation: [documenatation ๋งํฌ](https://python.langchain.com/docs/get_started/quickstart) <br>\n",
    "- Deeplearning AI ๊ฐ•์˜(2์‹œ๊ฐ„): [๊ฐ•์˜๋งํฌ](https://www.deeplearning.ai/short-courses/langchain-for-llm-application-development/)\n",
    "- ์šฐ๋ฆฌ๋ชจ๋ธ๊ณผ ๋น„์Šทํ•œ ๊ตฌ์กฐ๋กœ ๊ตฌํ˜„๋œ ์ž๋ฃŒ(Sales GPT): [Sales GPT](https://python.langchain.com/docs/use_cases/agents/sales_agent_with_context)"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## ์šฐ๋ฆฌ ๋ชจ๋ธ ๊ตฌ์กฐ\n",
    "<img src=\"./assets/architecture.png\" width=\"500\" height=\"500\">\n",
    "\n",
    "### ๊ตฌ์„ฑ ์š”์†Œ\n",
    "- Assistant: ๋Œ€ํ™” ๊ธฐ๋ก์„ ๋ณด๊ณ , ๋‹ค์Œ์— Agent๊ฐ€ ์ทจํ•ด์•ผํ•  ์ ์ ˆํ•œ ํ–‰๋™์„ ์ถœ๋ ฅํ•œ๋‹ค.\n",
    "- Agent: ๋Œ€ํ™” ๊ธฐ๋ก๊ณผ Assistant์—์„œ ์ถœ๋ ฅํ•œ ํ–‰๋™์— ๋”ฐ๋ผ ๋„๊ตฌ๋ฅผ ํ™œ์šฉํ•ด ์œ ์ €์—๊ฒŒ ์ „๋‹ฌํ•  ์ ์ ˆํ•œ ์‘๋‹ต์„ ์ƒ์„ฑํ•œ๋‹ค.\n",
    "- Tools: ์™ธ๋ถ€ ๋ฐ์ดํ„ฐ๋ฅผ ํ™œ์šฉํ•˜๊ธฐ ์œ„ํ•œ ๋„๊ตฌ\n",
    "- Database: ์™€์ธ, ์™€์ธ๋ฐ” ๋“ฑ์˜ ์ •๋ณด๊ฐ€ ๋‹ด๊ฒจ์žˆ๋Š” ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค\n",
    "- Web: ๋ง๊ทธ๋Œ€๋กœ ์›น(๊ตฌ๊ธ€)"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## requirements\n",
    "\n",
    "- pip install langchain\n",
    "- pip install openai\n",
    "- pip install ipykernel\n",
    "- pip install pandas\n",
    "- pip install chromadb\n",
    "- pip install tiktoken\n",
    "- pip install lark\n",
    "- pip install \"langchain[docarray]\"\n",
    "- pip install google-search-results\n",
    "- pip install gradio"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### ๊ฐ€์žฅ ๋จผ์ € [quickstart ๋…ธํŠธ๋ถ](quickstart.ipynb)์„ ํ†ตํ•ด ์ „์ฒด ๋ชจ๋“ˆ์„ ํŒŒ์•…ํ•ด๋ณด์„ธ์š”! "
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## TODO\n",
    "### Assistant\n",
    "- [Assistant ๋…ธํŠธ๋ถ](./assistant.ipynb)\n",
    "- ๋ชฉํ‘œ: Assistant evaluation set์— ๋Œ€ํ•ด 95% ์ด์ƒ์œผ๋กœ Agent์˜ ๋‹ค์Œ action์„ ์˜ˆ์ธก\n",
    "\n",
    "### ๋Œ€ํ™” ๋ฐ์ดํ„ฐ์…‹ ์ œ์ž‘\n",
    "- [Dialog dataset ์ œ์ž‘ ๋…ธํŠธ๋ถ](./generate_dialog.ipynb)\n",
    "- ๋ชฉํ‘œ: ์šฐ๋ฆฌ ์ฑ—๋ด‡์—์„œ ์ผ์–ด๋‚ ๋งŒํ•œ ๋Œ€ํ™” ๋ฐ์ดํ„ฐ์…‹ 100๊ฐœ ์ œ์ž‘\n",
    "\n",
    "### Evaluation Set ์ œ์ž‘\n",
    "- [Evaluation Set ์ œ์ž‘ ๋…ธํŠธ๋ถ](./generate_evaluation.ipynb)\n",
    "- ๋ชฉํ‘œ: Assistant์™€ Agent evaluation set ์ œ์ž‘\n",
    "\n",
    "### Tools ๋ฐ ์•Œ๊ณ ๋ฆฌ์ฆ˜ ์ œ์ž‘\n",
    "- [Langchain Tools ๋…ธํŠธ๋ถ](./tools.ipynb)\n",
    "\n",
    "### ์™€์ธ ๋ฐ ์™€์ธ๋ฐ” database ์ œ์ž‘\n",
    "- [wine database ์ œ์ž‘ ๋…ธํŠธ๋ถ](./crawl_wine.ipynb)\n",
    "- [winebar database ์ œ์ž‘ ๋…ธํŠธ๋ถ](./crawl_winebar.ipynb)\n",
    "- ๋ชฉํ‘œ: ํฌ๋กค๋ง์„ ํ†ตํ•œ ์™€์ธ ๋ฐ ์™€์ธ๋ฐ” database ์ œ์ž‘\n",
    "\n",
    "### Agent\n",
    "- [Agent ๋…ธํŠธ๋ถ](./agent.ipynb)\n",
    "\n",
    "### Gradio๋ฅผ ํ†ตํ•œ ์›น๋ฐ๋ชจ ์ œ์ž‘\n",
    "- [Gradio ๋ฐฐํฌ ๋…ธํŠธ๋ถ](./gradio_web.ipynb)\n",
    "- ๋ชฉํ‘œ: ์•ฑ ์ œ์ž‘ ์ „ ์–ธ์–ด๋ชจ๋ธ ํ…Œ์ŠคํŠธ ๋ฐ GPT4๋กœ ์ƒ์„ฑํ•œ ๋ฐ์ดํ„ฐ์…‹ ์‚ฌ๋žŒ์ด ๊ฒ€์ฆ ๋ฐ ์ˆ˜์ •"
   ]
  }
 ],
 "metadata": {
  "language_info": {
   "name": "python"
  },
  "orig_nbformat": 4
 },
 "nbformat": 4,
 "nbformat_minor": 2
}