<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>RAG on Chanyeol Dev</title>
    <link>https://chanyeols.com/tags/rag/</link>
    <description>Recent content in RAG on Chanyeol Dev</description>
    <generator>Hugo</generator>
    <language>ko-kr</language>
    <lastBuildDate>Sun, 22 Mar 2026 14:30:00 +0900</lastBuildDate>
    <atom:link href="https://chanyeols.com/tags/rag/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Spring AI RAG 워크플로우 분석: 사용자 질문부터 AI 답변까지의 여정 (6편)</title>
      <link>https://chanyeols.com/posts/spring-ai-rag-workflow-analysis/</link>
      <pubDate>Sun, 22 Mar 2026 14:30:00 +0900</pubDate>
      <guid>https://chanyeols.com/posts/spring-ai-rag-workflow-analysis/</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;[Dev-Fortune] 시리즈 다시보기&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://chanyeols.com/posts/spring-ai-ollama-chatbot-planning/&#34;&gt;1편: 기획부터 스택 선정까지&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://chanyeols.com/posts/ollama-spring-boot-local-llm-setup/&#34;&gt;2편: 로컬 LLM Ollama 연동&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://chanyeols.com/posts/spring-ai-rag-simplevectorstore-ingestion/&#34;&gt;3편: RAG와 Vector Store 구축&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://chanyeols.com/posts/prompt-engineering-ai-persona-tuning/&#34;&gt;4편: 프롬프트 엔지니어링 실전&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://chanyeols.com/posts/spring-webflux-sse-ai-streaming-api/&#34;&gt;5편: 스트리밍 API 구현&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;1-서론-조각난-퍼즐을-하나로-합치기&#34;&gt;1. 서론: 조각난 퍼즐을 하나로 합치기&lt;/h2&gt;
&lt;p&gt;데이터의 이동이 일어나는 찰나의 순간, 서버 내부에서 일어나는 유기적인 상호작용을 파헤쳐 보겠습니다.&lt;/p&gt;
&lt;h2 id=&#34;2-전체-워크플로우-시퀀스-deep-dive&#34;&gt;2. 전체 워크플로우 시퀀스 (Deep-Dive)&lt;/h2&gt;
&lt;p&gt;사용자의 엔터 키 한 번이 답변으로 돌아오기까지의 7단계 여정입니다.&lt;/p&gt;
&lt;div class=&#34;mermaid&#34;&gt;
sequenceDiagram
    autonumber
    User-&gt;&gt;Controller: 고민 입력 (JSON)
    Controller-&gt;&gt;Service: 사주 분석 요청
    Service-&gt;&gt;VectorStore: 고민 기반 유사도 검색
    VectorStore--&gt;&gt;Service: 관련 사주 데이터 반환
    Service-&gt;&gt;AI: 프롬프트 조합 후 전달 (System+User)
    AI--&gt;&gt;Controller: 스트리밍 답변 생성 (Flux)
    Controller--&gt;&gt;User: SSE 응답 (실시간 텍스트)
&lt;/div&gt;
&lt;h2 id=&#34;3-데이터-흐름의-5단계&#34;&gt;3. 데이터 흐름의 5단계&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;요청 수신&lt;/strong&gt;: JSON 고민 데이터 접수.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;의미 검색&lt;/strong&gt;: 사주 데이터 조각 탐색.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;프롬프트 조합&lt;/strong&gt;: 페르소나 + 지식 + 질문 결합.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;추론 및 생성&lt;/strong&gt;: AI의 인격이 투영된 답변 생성.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;스트리밍 응답&lt;/strong&gt;: 차가운 조언의 실시간 전달.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;결국 &lt;strong&gt;데이터가 지능을 만들고, 프롬프트가 성격을 만듭니다.&lt;/strong&gt;&lt;/p&gt;</description>
      <content:encoded><![CDATA[<blockquote>
<p><strong>[Dev-Fortune] 시리즈 다시보기</strong></p>
</blockquote>
<ul>
<li><a href="/posts/spring-ai-ollama-chatbot-planning/">1편: 기획부터 스택 선정까지</a></li>
<li><a href="/posts/ollama-spring-boot-local-llm-setup/">2편: 로컬 LLM Ollama 연동</a></li>
<li><a href="/posts/spring-ai-rag-simplevectorstore-ingestion/">3편: RAG와 Vector Store 구축</a></li>
<li><a href="/posts/prompt-engineering-ai-persona-tuning/">4편: 프롬프트 엔지니어링 실전</a></li>
<li><a href="/posts/spring-webflux-sse-ai-streaming-api/">5편: 스트리밍 API 구현</a></li>
</ul>
<h2 id="1-서론-조각난-퍼즐을-하나로-합치기">1. 서론: 조각난 퍼즐을 하나로 합치기</h2>
<p>데이터의 이동이 일어나는 찰나의 순간, 서버 내부에서 일어나는 유기적인 상호작용을 파헤쳐 보겠습니다.</p>
<h2 id="2-전체-워크플로우-시퀀스-deep-dive">2. 전체 워크플로우 시퀀스 (Deep-Dive)</h2>
<p>사용자의 엔터 키 한 번이 답변으로 돌아오기까지의 7단계 여정입니다.</p>
<div class="mermaid">
sequenceDiagram
    autonumber
    User->>Controller: 고민 입력 (JSON)
    Controller->>Service: 사주 분석 요청
    Service->>VectorStore: 고민 기반 유사도 검색
    VectorStore-->>Service: 관련 사주 데이터 반환
    Service->>AI: 프롬프트 조합 후 전달 (System+User)
    AI-->>Controller: 스트리밍 답변 생성 (Flux)
    Controller-->>User: SSE 응답 (실시간 텍스트)
</div>
<h2 id="3-데이터-흐름의-5단계">3. 데이터 흐름의 5단계</h2>
<ol>
<li><strong>요청 수신</strong>: JSON 고민 데이터 접수.</li>
<li><strong>의미 검색</strong>: 사주 데이터 조각 탐색.</li>
<li><strong>프롬프트 조합</strong>: 페르소나 + 지식 + 질문 결합.</li>
<li><strong>추론 및 생성</strong>: AI의 인격이 투영된 답변 생성.</li>
<li><strong>스트리밍 응답</strong>: 차가운 조언의 실시간 전달.</li>
</ol>
<p>결국 <strong>데이터가 지능을 만들고, 프롬프트가 성격을 만듭니다.</strong></p>
<p><strong>마지막 7편에서는 프로젝트를 마무리하며 미래 고도화 로드맵을 그려보겠습니다.</strong></p>
]]></content:encoded>
    </item>
    <item>
      <title>Spring AI RAG 구현하기: SimpleVectorStore로 전문 지식 데이터 주입 (3편)</title>
      <link>https://chanyeols.com/posts/spring-ai-rag-simplevectorstore-ingestion/</link>
      <pubDate>Thu, 19 Mar 2026 14:30:00 +0900</pubDate>
      <guid>https://chanyeols.com/posts/spring-ai-rag-simplevectorstore-ingestion/</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;[Dev-Fortune] 시리즈 다시보기&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://chanyeols.com/posts/spring-ai-ollama-chatbot-planning/&#34;&gt;1편: 기획부터 스택 선정까지&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://chanyeols.com/posts/ollama-spring-boot-local-llm-setup/&#34;&gt;2편: 로컬 LLM Ollama 연동&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;1-서론-ai는-어떻게-사주를-공부하는가&#34;&gt;1. 서론: AI는 어떻게 사주를 &amp;lsquo;공부&amp;rsquo;하는가?&lt;/h2&gt;
&lt;p&gt;AI에게 새로운 지식을 가르치는 방법 중 가장 경제적이고 정확한 &lt;strong&gt;RAG(Retrieval-Augmented Generation)&lt;/strong&gt; 방식을 살펴봅니다. 질문이 들어올 때마다 관련 내용을 찾아서 읽어주며 답변하게 하는 원리입니다.&lt;/p&gt;
&lt;h2 id=&#34;2-데이터-주입-프로세스-data-ingestion&#34;&gt;2. 데이터 주입 프로세스 (Data Ingestion)&lt;/h2&gt;
&lt;p&gt;JSON 파일이 어떻게 벡터화되어 메모리에 저장되는지 그 흐름을 도식화했습니다.&lt;/p&gt;
&lt;div class=&#34;mermaid&#34;&gt;
flowchart LR
    A[(sajuAPI.json)] --&gt; B[DataLoader]
    B --&gt; C[Text 정제: Key-Value형식]
    C --&gt; D[Embedding Model]
    D --&gt; E{SimpleVectorStore}
    E --&gt; F[RAM Memory]
&lt;pre&gt;&lt;code&gt;style F fill:#f96,stroke:#333,stroke-width:2px
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;h2 id=&#34;3-simplevectorstore와-dataloader&#34;&gt;3. SimpleVectorStore와 DataLoader&lt;/h2&gt;
&lt;p&gt;우리 프로젝트는 별도의 DB 없이 메모리 기반의 &lt;code&gt;SimpleVectorStore&lt;/code&gt;를 사용합니다. &lt;code&gt;UnidocuDataLoader&lt;/code&gt;는 서버 기동 시점에 JSON 데이터를 읽어 벡터로 변환하여 주입합니다.&lt;/p&gt;</description>
      <content:encoded><![CDATA[<blockquote>
<p><strong>[Dev-Fortune] 시리즈 다시보기</strong></p>
</blockquote>
<ul>
<li><a href="/posts/spring-ai-ollama-chatbot-planning/">1편: 기획부터 스택 선정까지</a></li>
<li><a href="/posts/ollama-spring-boot-local-llm-setup/">2편: 로컬 LLM Ollama 연동</a></li>
</ul>
<h2 id="1-서론-ai는-어떻게-사주를-공부하는가">1. 서론: AI는 어떻게 사주를 &lsquo;공부&rsquo;하는가?</h2>
<p>AI에게 새로운 지식을 가르치는 방법 중 가장 경제적이고 정확한 <strong>RAG(Retrieval-Augmented Generation)</strong> 방식을 살펴봅니다. 질문이 들어올 때마다 관련 내용을 찾아서 읽어주며 답변하게 하는 원리입니다.</p>
<h2 id="2-데이터-주입-프로세스-data-ingestion">2. 데이터 주입 프로세스 (Data Ingestion)</h2>
<p>JSON 파일이 어떻게 벡터화되어 메모리에 저장되는지 그 흐름을 도식화했습니다.</p>
<div class="mermaid">
flowchart LR
    A[(sajuAPI.json)] --> B[DataLoader]
    B --> C[Text 정제: Key-Value형식]
    C --> D[Embedding Model]
    D --> E{SimpleVectorStore}
    E --> F[RAM Memory]
<pre><code>style F fill:#f96,stroke:#333,stroke-width:2px
</code></pre>
</div>
<h2 id="3-simplevectorstore와-dataloader">3. SimpleVectorStore와 DataLoader</h2>
<p>우리 프로젝트는 별도의 DB 없이 메모리 기반의 <code>SimpleVectorStore</code>를 사용합니다. <code>UnidocuDataLoader</code>는 서버 기동 시점에 JSON 데이터를 읽어 벡터로 변환하여 주입합니다.</p>
<div class="highlight"><pre tabindex="0" style="color:#e6edf3;background-color:#0d1117;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-java" data-lang="java"><span style="display:flex;"><span><span style="color:#8b949e;font-style:italic">// 텍스트 정제 예시</span><span style="color:#6e7681">
</span></span></span><span style="display:flex;"><span>String<span style="color:#6e7681"> </span>content<span style="color:#6e7681"> </span><span style="color:#ff7b72;font-weight:bold">=</span><span style="color:#6e7681"> </span>String.format(<span style="color:#6e7681">
</span></span></span><span style="display:flex;"><span><span style="color:#6e7681">    </span><span style="color:#a5d6ff">&#34;it_interpretation: %s\nanti_pattern: %s\nbad_habit: %s&#34;</span>,<span style="color:#6e7681">
</span></span></span><span style="display:flex;"><span><span style="color:#6e7681">    </span>item.get(<span style="color:#a5d6ff">&#34;it_interpretation&#34;</span>),<span style="color:#6e7681"> </span>...<span style="color:#6e7681">
</span></span></span><span style="display:flex;"><span>);<span style="color:#6e7681">
</span></span></span></code></pre></div><h2 id="4-유사도-검색similarity-search">4. 유사도 검색(Similarity Search)</h2>
<p>사용자가 &ldquo;프로젝트 마감&quot;에 대해 물으면, 벡터 저장소는 의미적으로 유사한 사주 데이터 상위 3개를 찾아 AI에게 전달합니다.</p>
<p><strong>다음 4편에서는 이 데이터를 기반으로 시니컬한 말투를 생성하는 &lsquo;프롬프트 엔지니어링&rsquo;에 대해 다뤄보겠습니다.</strong></p>
]]></content:encoded>
    </item>
    <item>
      <title>Spring AI와 Ollama로 만드는 AI 개발자 사주 챗봇: 기획부터 스택 선정까지 (1편)</title>
      <link>https://chanyeols.com/posts/spring-ai-ollama-chatbot-planning/</link>
      <pubDate>Tue, 17 Mar 2026 14:30:00 +0900</pubDate>
      <guid>https://chanyeols.com/posts/spring-ai-ollama-chatbot-planning/</guid>
      <description>&lt;h2 id=&#34;1-프롤로그-왜-ai-개발자-사주인가&#34;&gt;1. 프롤로그: 왜 &amp;lsquo;AI 개발자&amp;rsquo; 사주인가?&lt;/h2&gt;
&lt;p&gt;전통적인 사주 풀이는 어렵고 따분합니다. &amp;ldquo;올해는 물의 기운이 강하니&amp;hellip;&amp;rdquo; 같은 말은 현대의 개발자들에게는 다소 와닿지 않죠. 하지만 만약 **&amp;ldquo;실리콘밸리 출신의 천재 개발자&amp;rdquo;**가 당신의 인생을 코드로 보고 &amp;lsquo;디버깅&amp;rsquo;해준다면 어떨까요?&lt;/p&gt;
&lt;p&gt;이 프로젝트는 바로 그 엉뚱한 상상에서 시작되었습니다. 감정 섞인 위로 대신, 건조하고 시니컬한 말투로 당신의 사주를 &amp;ldquo;안티 패턴&amp;quot;과 &amp;ldquo;배드 해빗(Bad Habit)&amp;ldquo;으로 분석해 주는 챗봇, **&amp;lsquo;Dev-Fortune&amp;rsquo;**입니다.&lt;/p&gt;
&lt;h2 id=&#34;2-프로젝트-시스템-구조도&#34;&gt;2. 프로젝트 시스템 구조도&lt;/h2&gt;
&lt;p&gt;전체적인 데이터 흐름과 기술 스택을 한눈에 살펴보겠습니다.&lt;/p&gt;</description>
      <content:encoded><![CDATA[<h2 id="1-프롤로그-왜-ai-개발자-사주인가">1. 프롤로그: 왜 &lsquo;AI 개발자&rsquo; 사주인가?</h2>
<p>전통적인 사주 풀이는 어렵고 따분합니다. &ldquo;올해는 물의 기운이 강하니&hellip;&rdquo; 같은 말은 현대의 개발자들에게는 다소 와닿지 않죠. 하지만 만약 **&ldquo;실리콘밸리 출신의 천재 개발자&rdquo;**가 당신의 인생을 코드로 보고 &lsquo;디버깅&rsquo;해준다면 어떨까요?</p>
<p>이 프로젝트는 바로 그 엉뚱한 상상에서 시작되었습니다. 감정 섞인 위로 대신, 건조하고 시니컬한 말투로 당신의 사주를 &ldquo;안티 패턴&quot;과 &ldquo;배드 해빗(Bad Habit)&ldquo;으로 분석해 주는 챗봇, **&lsquo;Dev-Fortune&rsquo;**입니다.</p>
<h2 id="2-프로젝트-시스템-구조도">2. 프로젝트 시스템 구조도</h2>
<p>전체적인 데이터 흐름과 기술 스택을 한눈에 살펴보겠습니다.</p>
<div class="mermaid">
graph TD
    A[사용자 고민 입력] --> B[Spring Boot Application]
    subgraph "Backend Stack"
        B --> C{Spring AI}
        C --> D[WebFlux/Streaming]
        C --> E[SimpleVectorStore]
    end
    subgraph "AI Engine"
        C -- HTTP:11434 --- F[Ollama: qwen2.5]
    end
    subgraph "Data Source"
        G[(sajuAPI.json)] --> E
    end
    B --> H[시니컬한 개발자 사주 답변]
</div>
<h2 id="3-기술-스택-the-stack">3. 기술 스택 (The Stack)</h2>
<ul>
<li><strong>Framework</strong>: Spring Boot 3.x</li>
<li><strong>AI Library</strong>: <strong>Spring AI</strong></li>
<li><strong>LLM</strong>: <strong>Ollama</strong> (qwen2.5:3b)</li>
<li><strong>Vector DB</strong>: <code>SimpleVectorStore</code></li>
<li><strong>Data Source</strong>: JSON 기반의 사주 풀이 데이터</li>
</ul>
<h2 id="4-왜-spring-ai와-rag인가">4. 왜 Spring AI와 RAG인가?</h2>
<p>일반적인 모델은 사주에 대한 지식이 파편화되어 있거나, 우리가 원하는 특유의 &ldquo;개발자 스타일&quot;로 대답하도록 통제하기 어렵습니다. 이를 해결하기 위해 우리는 <strong>RAG(Retrieval-Augmented Generation)</strong> 기법을 사용하여 전문 사주 데이터를 미리 벡터화해서 저장해 둡니다.</p>
<p>다음 편에서는 <strong>Ollama를 이용해 내 컴퓨터에 로컬 AI 환경을 구축하고 Spring Boot와 연결하는 방법</strong>을 알아보겠습니다.</p>
]]></content:encoded>
    </item>
  </channel>
</rss>
