|
7 | 7 | <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes"> |
8 | 8 |
|
9 | 9 |
|
10 | | -<title>experiment-1 – johnjoon's blog</title> |
| 10 | +<title>Project Sentinel – johnjoon’s blog</title> |
11 | 11 | <style> |
12 | 12 | code{white-space: pre-wrap;} |
13 | 13 | span.smallcaps{font-variant: small-caps;} |
|
131 | 131 | <button type="button" class="quarto-btn-toggle btn" data-bs-toggle="collapse" role="button" data-bs-target=".quarto-sidebar-collapse-item" aria-controls="quarto-sidebar" aria-expanded="false" aria-label="Toggle sidebar navigation" onclick="if (window.quartoToggleHeadroom) { window.quartoToggleHeadroom(); }"> |
132 | 132 | <i class="bi bi-layout-text-sidebar-reverse"></i> |
133 | 133 | </button> |
134 | | - <nav class="quarto-page-breadcrumbs" aria-label="breadcrumb"><ol class="breadcrumb"><li class="breadcrumb-item">Posts</li><li class="breadcrumb-item"><a href="../../posts/mainshow/experiment-1.html">Mainshow</a></li><li class="breadcrumb-item"><a href="../../posts/mainshow/experiment-1.html">Experiment 1</a></li></ol></nav> |
| 134 | + <nav class="quarto-page-breadcrumbs" aria-label="breadcrumb"><ol class="breadcrumb"><li class="breadcrumb-item">Posts</li><li class="breadcrumb-item"><a href="../../posts/mainshow/poc-sentinel.html">Mainshow</a></li><li class="breadcrumb-item"><a href="../../posts/mainshow/poc-sentinel.html">Project Sentinel</a></li></ol></nav> |
135 | 135 | <a class="flex-grow-1" role="navigation" data-bs-toggle="collapse" data-bs-target=".quarto-sidebar-collapse-item" aria-controls="quarto-sidebar" aria-expanded="false" aria-label="Toggle sidebar navigation" onclick="if (window.quartoToggleHeadroom) { window.quartoToggleHeadroom(); }"> |
136 | 136 | </a> |
137 | 137 | </div> |
|
169 | 169 | <ul id="quarto-sidebar-section-2" class="collapse list-unstyled sidebar-section depth2 show"> |
170 | 170 | <li class="sidebar-item"> |
171 | 171 | <div class="sidebar-item-container"> |
172 | | - <a href="../../posts/mainshow/experiment-1.html" class="sidebar-item-text sidebar-link active"> |
173 | | - <span class="menu-text">Experiment 1</span></a> |
| 172 | + <a href="../../posts/mainshow/poc-sentinel.html" class="sidebar-item-text sidebar-link active"> |
| 173 | + <span class="menu-text">Project Sentinel</span></a> |
174 | 174 | </div> |
175 | 175 | </li> |
176 | 176 | </ul> |
|
216 | 216 | </nav> |
217 | 217 | <div id="quarto-sidebar-glass" class="quarto-sidebar-collapse-item" data-bs-toggle="collapse" data-bs-target=".quarto-sidebar-collapse-item"></div> |
218 | 218 | <!-- margin-sidebar --> |
219 | | - <div id="quarto-margin-sidebar" class="sidebar margin-sidebar zindex-bottom"> |
220 | | - |
| 219 | + <div id="quarto-margin-sidebar" class="sidebar margin-sidebar"> |
| 220 | + <nav id="TOC" role="doc-toc" class="toc-active"> |
| 221 | + <h2 id="toc-title">On this page</h2> |
| 222 | + |
| 223 | + <ul> |
| 224 | + <li><a href="#프로젝트-개요" id="toc-프로젝트-개요" class="nav-link active" data-scroll-target="#프로젝트-개요">프로젝트 개요</a> |
| 225 | + <ul class="collapse"> |
| 226 | + <li><a href="#llm-agent-sentinel" id="toc-llm-agent-sentinel" class="nav-link" data-scroll-target="#llm-agent-sentinel">LLM Agent: <strong>Sentinel</strong></a></li> |
| 227 | + <li><a href="#how-to-run-gun" id="toc-how-to-run-gun" class="nav-link" data-scroll-target="#how-to-run-gun">How-to: <strong>Run & Gun</strong></a></li> |
| 228 | + </ul></li> |
| 229 | + <li><a href="#ai-agent의-역할-정의" id="toc-ai-agent의-역할-정의" class="nav-link" data-scroll-target="#ai-agent의-역할-정의">1. AI Agent의 역할 정의</a></li> |
| 230 | + <li><a href="#poc-by-langgraph" id="toc-poc-by-langgraph" class="nav-link" data-scroll-target="#poc-by-langgraph">2. POC by LangGraph</a> |
| 231 | + <ul class="collapse"> |
| 232 | + <li><a href="#langgraph-설치" id="toc-langgraph-설치" class="nav-link" data-scroll-target="#langgraph-설치">2.1 LangGraph 설치</a></li> |
| 233 | + </ul></li> |
| 234 | + <li><a href="#features" id="toc-features" class="nav-link" data-scroll-target="#features"><strong>Features</strong>:</a></li> |
| 235 | + </ul> |
| 236 | +</nav> |
221 | 237 | </div> |
222 | 238 | <!-- main --> |
223 | | -<main class="content" id="quarto-document-content"><header id="title-block-header" class="quarto-title-block"><nav class="quarto-page-breadcrumbs quarto-title-breadcrumbs d-none d-lg-block" aria-label="breadcrumb"><ol class="breadcrumb"><li class="breadcrumb-item">Posts</li><li class="breadcrumb-item"><a href="../../posts/mainshow/experiment-1.html">Mainshow</a></li><li class="breadcrumb-item"><a href="../../posts/mainshow/experiment-1.html">Experiment 1</a></li></ol></nav></header> |
| 239 | +<main class="content" id="quarto-document-content"> |
224 | 240 |
|
| 241 | +<header id="title-block-header" class="quarto-title-block default"><nav class="quarto-page-breadcrumbs quarto-title-breadcrumbs d-none d-lg-block" aria-label="breadcrumb"><ol class="breadcrumb"><li class="breadcrumb-item">Posts</li><li class="breadcrumb-item"><a href="../../posts/mainshow/poc-sentinel.html">Mainshow</a></li><li class="breadcrumb-item"><a href="../../posts/mainshow/poc-sentinel.html">Project Sentinel</a></li></ol></nav> |
| 242 | +<div class="quarto-title"> |
| 243 | +<h1 class="title">Project Sentinel</h1> |
| 244 | +</div> |
225 | 245 |
|
226 | 246 |
|
227 | 247 |
|
228 | | -<div id="cell-0" class="cell" data-execution_count="3"> |
229 | | -<div class="sourceCode cell-code" id="cb1"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="im">import</span> pandas <span class="im">as</span> pd</span> |
230 | | -<span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a><span class="im">from</span> pprint <span class="im">import</span> pprint</span> |
231 | | -<span id="cb1-3"><a href="#cb1-3" aria-hidden="true" tabindex="-1"></a></span> |
232 | | -<span id="cb1-4"><a href="#cb1-4" aria-hidden="true" tabindex="-1"></a>data <span class="op">=</span> [</span> |
233 | | -<span id="cb1-5"><a href="#cb1-5" aria-hidden="true" tabindex="-1"></a> {</span> |
234 | | -<span id="cb1-6"><a href="#cb1-6" aria-hidden="true" tabindex="-1"></a> <span class="st">"name"</span>: <span class="st">"재명"</span>,</span> |
235 | | -<span id="cb1-7"><a href="#cb1-7" aria-hidden="true" tabindex="-1"></a> <span class="st">"sex"</span>: <span class="st">"male"</span>,</span> |
236 | | -<span id="cb1-8"><a href="#cb1-8" aria-hidden="true" tabindex="-1"></a> <span class="st">"party"</span>: <span class="st">"DP"</span>,</span> |
237 | | -<span id="cb1-9"><a href="#cb1-9" aria-hidden="true" tabindex="-1"></a> },</span> |
238 | | -<span id="cb1-10"><a href="#cb1-10" aria-hidden="true" tabindex="-1"></a> {</span> |
239 | | -<span id="cb1-11"><a href="#cb1-11" aria-hidden="true" tabindex="-1"></a> <span class="st">"name"</span>: <span class="st">"덕수"</span>,</span> |
240 | | -<span id="cb1-12"><a href="#cb1-12" aria-hidden="true" tabindex="-1"></a> <span class="st">"sex"</span>: <span class="st">"male"</span>,</span> |
241 | | -<span id="cb1-13"><a href="#cb1-13" aria-hidden="true" tabindex="-1"></a> <span class="st">"party"</span>: <span class="st">"PPP"</span>,</span> |
242 | | -<span id="cb1-14"><a href="#cb1-14" aria-hidden="true" tabindex="-1"></a> },</span> |
243 | | -<span id="cb1-15"><a href="#cb1-15" aria-hidden="true" tabindex="-1"></a> {</span> |
244 | | -<span id="cb1-16"><a href="#cb1-16" aria-hidden="true" tabindex="-1"></a> <span class="st">"name"</span>: <span class="st">"준석"</span>,</span> |
245 | | -<span id="cb1-17"><a href="#cb1-17" aria-hidden="true" tabindex="-1"></a> <span class="st">"sex"</span>: <span class="st">"male"</span>,</span> |
246 | | -<span id="cb1-18"><a href="#cb1-18" aria-hidden="true" tabindex="-1"></a> <span class="st">"party"</span>: <span class="st">"Revolution"</span>,</span> |
247 | | -<span id="cb1-19"><a href="#cb1-19" aria-hidden="true" tabindex="-1"></a> }</span> |
248 | | -<span id="cb1-20"><a href="#cb1-20" aria-hidden="true" tabindex="-1"></a>]</span> |
249 | | -<span id="cb1-21"><a href="#cb1-21" aria-hidden="true" tabindex="-1"></a></span> |
250 | | -<span id="cb1-22"><a href="#cb1-22" aria-hidden="true" tabindex="-1"></a>df <span class="op">=</span> pd.DataFrame(data)</span> |
251 | | -<span id="cb1-23"><a href="#cb1-23" aria-hidden="true" tabindex="-1"></a>pprint(df.head())</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div> |
252 | | -<div class="cell-output cell-output-stdout"> |
253 | | -<pre><code> name sex party |
254 | | -0 재명 male DP |
255 | | -1 덕수 male PPP |
256 | | -2 준석 male Revolution</code></pre> |
257 | | -</div> |
| 248 | +<div class="quarto-title-meta"> |
| 249 | + |
| 250 | + |
| 251 | + |
| 252 | + |
| 253 | + </div> |
| 254 | + |
| 255 | + |
| 256 | + |
| 257 | +</header> |
| 258 | + |
| 259 | + |
| 260 | +<p><strong>Author</strong>: johnjoon2004 (@<a href="https://github.com/code-b-dev">code-b-devs</a>)<br> |
| 261 | +<strong>Date</strong>: 2025-05-13</p> |
| 262 | +<hr> |
| 263 | +<section id="프로젝트-개요" class="level2"> |
| 264 | +<h2 class="anchored" data-anchor-id="프로젝트-개요">프로젝트 개요</h2> |
| 265 | +<section id="llm-agent-sentinel" class="level3"> |
| 266 | +<h3 class="anchored" data-anchor-id="llm-agent-sentinel">LLM Agent: <strong>Sentinel</strong></h3> |
| 267 | +<ul> |
| 268 | +<li>본 프로젝트는 ’사용자 대화 및 일기 기반 멘탈 케어 AI Agent 연구 및 구현’을 목표로 합니다.</li> |
| 269 | +<li>구현하고자 하는 Agent별 기능의 확장성(Adaptability)을 핵심 요소로 고려하였기 때문에, 이러한 이름을 붙였습니다.</li> |
| 270 | +<li>원작 <<a href="https://www.imdb.com/title/tt1877832/">X-Men: Days of Future Past</a>>에 나오는 ’센티넬’은 꽤나 무시무시한 친구지만, 우리의 Sentinel은 작고 소중한 친구입니다.</li> |
| 271 | +</ul> |
| 272 | +</section> |
| 273 | +<section id="how-to-run-gun" class="level3"> |
| 274 | +<h3 class="anchored" data-anchor-id="how-to-run-gun">How-to: <strong>Run & Gun</strong></h3> |
| 275 | +<ul> |
| 276 | +<li>제가 그냥 붙인 이름입니다. 무언가를 학습하는 과정에서 문서화와 프로토타입 구현을 동반하는 방식을 의미합니다.</li> |
| 277 | +<li>고도화된 에이전트 서비스 구현을 논하기엔 아직 제반 지식이 부족합니다.</li> |
| 278 | +<li>적어도 어떤 기능들이 필요할지, 그리고 그 기능들을 어떻게 구현할 수 있을지 정도까지는 빠르게 도달해야 합니다.</li> |
| 279 | +<li>Survey 논문과 체계적으로 정리된 자료들(블로그/위키독스)부터 접근하는 것이 효율적으로 보입니다.</li> |
| 280 | +<li>기존에는 서비스를 구현할 때 요구 사항과 스펙을 나름 Solid하게 정의해두고 그 후 구현하는 과정을 겪어봤는데, <u>개발 기간이 길어질수록 창의력과 유연성을 유지하기 매우 어려운 문제</u>가 느껴졌습니다.</li> |
| 281 | +<li>따라서, 이번에는 소위 ‘<strong>Run & Gun</strong>’ 방식으로 개발을 진행합니다.</li> |
| 282 | +<li>핵심은 속도입니다. 하나의 <strong>읽고=> 정리하고=> 구현하는</strong> 과정이 <strong>48시간</strong>을 초과하지 않게 관리해볼 생각입니다.</li> |
| 283 | +<li>물론 완결성에 대한 trade-off는 감수해야 합니다.</li> |
| 284 | +</ul> |
| 285 | +<div id="cell-5" class="cell" data-execution_count="1"> |
| 286 | +<div class="sourceCode cell-code" id="cb1"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="op">%</span>load_ext autoreload</span> |
| 287 | +<span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a><span class="op">%</span>autoreload <span class="dv">2</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div> |
258 | 288 | </div> |
| 289 | +</section> |
| 290 | +</section> |
| 291 | +<section id="ai-agent의-역할-정의" class="level2"> |
| 292 | +<h2 class="anchored" data-anchor-id="ai-agent의-역할-정의">1. AI Agent의 역할 정의</h2> |
| 293 | +<ul> |
| 294 | +<li>현재 AI 챗봇 서비스(chat) 및 일기장 관리 시스템(diary)의 인프라와 API가 구축되어 있습니다. 이들을 기반으로 AI Agent의 구체적인 기능들을 정의해봅시다.</li> |
| 295 | +<li>공통적으로 사용자의 모든 질문에 답변을 제공해야 합니다.</li> |
| 296 | +<li>사용자가 직접 설정한, 또는 대화 맥락을 통해 잠재적으로 사용자에게 맞춤화된 ’페르소나’를 LLM에 투영시키는 기능이 고려된 바 있습니다.</li> |
| 297 | +</ul> |
| 298 | +</section> |
| 299 | +<section id="poc-by-langgraph" class="level2"> |
| 300 | +<h2 class="anchored" data-anchor-id="poc-by-langgraph">2. POC by LangGraph</h2> |
| 301 | +<ul> |
| 302 | +<li>기존 LangChain 코드 자산을 그대로 활용하면서도, agent 간 흐름을 명시적으로 설계하기 좋은 LangGraph를 일단 선택합니다.</li> |
| 303 | +<li>AugtoGen, MetaGPT, CrewAI 등 multi-agent framework들을 추후 고려해볼 수 있습니다.</li> |
| 304 | +</ul> |
| 305 | +<section id="langgraph-설치" class="level3"> |
| 306 | +<h3 class="anchored" data-anchor-id="langgraph-설치">2.1 LangGraph 설치</h3> |
| 307 | +<ul> |
| 308 | +<li>의존성 설치</li> |
| 309 | +<li>LangGraph 그래프 시각화 기능을 위해 graphviz 설치 (예시는 Windows 기준)</li> |
| 310 | +</ul> |
| 311 | +<div class="sourceCode" id="cb2"><pre class="sourceCode bash code-with-copy"><code class="sourceCode bash"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="ex">uv</span> add langgraph langchain langchain-openai</span> |
| 312 | +<span id="cb2-2"><a href="#cb2-2" aria-hidden="true" tabindex="-1"></a><span class="ex">choco</span> install graphviz</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div> |
| 313 | +</section> |
| 314 | +</section> |
| 315 | +<section id="features" class="level2"> |
| 316 | +<h2 class="anchored" data-anchor-id="features"><strong>Features</strong>:</h2> |
| 317 | +<ul> |
| 318 | +<li>RAG-Based functions</li> |
| 319 | +</ul> |
259 | 320 |
|
260 | 321 |
|
| 322 | +</section> |
261 | 323 |
|
262 | 324 | <p><span style="color: #888888"> <constraint>make sure the contents above are correct, fluent and doesn’t sound like a nerd.</constraint> </span></p></main> <!-- /main --> |
263 | 325 | <script id="quarto-html-after-body" type="application/javascript"> |
|
0 commit comments