Skip to content

Commit 3c59513

Browse files
committed
updated promptEngr/10localRAGchatbot
1 parent 67c5f49 commit 3c59513

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

promptEngr/10localRAGchatbot/index.html

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -704,7 +704,7 @@
704704
<meta name="generator" content="quarto-1.9.36">
705705

706706
<meta name="author" content="Mick McQuaid">
707-
<meta name="dcterms.date" content="2026-03-22">
707+
<meta name="dcterms.date" content="2026-03-25">
708708
<title>A local RAG chatbot</title>
709709
<meta name="apple-mobile-web-app-capable" content="yes">
710710
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
@@ -1422,7 +1422,7 @@ <h1 class="title">A local RAG chatbot</h1>
14221422
</div>
14231423
</div>
14241424

1425-
<p class="date">22 Mar 2026</p>
1425+
<p class="date">25 Mar 2026</p>
14261426
</section>
14271427
<section id="week-ten" class="title-slide slide level1 center">
14281428
<h1><span class="r-fit-text">Week TEN</span></h1>
@@ -1787,7 +1787,7 @@ <h3 id="technical-implementation-tasks">Technical Implementation Tasks</h3>
17871787
</div>
17881788
<div class="fragment fade-in-then-semi-out">
17891789
<ul>
1790-
<li>ViewModel: Create a CalculatorViewModel using <span class="citation" data-cites="Observable">(<a href="#/references" role="doc-biblioref" onclick><strong>Observable?</strong></a>)</span> (Swift 6) to manage state.</li>
1790+
<li>ViewModel: Create a CalculatorViewModel using @Observable (Swift 6) to manage state.</li>
17911791
</ul>
17921792
</div>
17931793
<div class="fragment fade-in-then-semi-out">
@@ -1934,7 +1934,7 @@ <h3 id="core-features">Core Features</h3>
19341934
<h3 id="live-updating">Live updating:</h3>
19351935
<p>All calculations should update in real time as inputs change. UI Requirements Use SwiftUI Clean, minimal, Apple-native design Large readable typography Card-style layout sections Proper spacing and padding Support light and dark mode Use iOS system colors Use keyboard type .decimalPad for money input Add a toolbar “Done” button to dismiss keyboard</p>
19361936
<h3 id="technical-requirements">Technical Requirements</h3>
1937-
<p>Use MVVM architecture Create: ContentView BillViewModel Use <span class="citation" data-cites="StateObject">(<a href="#/references" role="doc-biblioref" onclick><strong>StateObject?</strong></a>)</span> for ViewMode Validate numeric input safely Prevent crashes from invalid text input Use computed properties for calculations Format currency using NumberFormatter Avoid UIKit unless absolutely necessary Bonus Features (if possible) Round up per-person amount toggle Persist last used tip percentage using <span class="citation" data-cites="AppStorage">(<a href="#/references" role="doc-biblioref" onclick><strong>AppStorage?</strong></a>)</span> Add subtle animation when totals change Add haptic feedback when calculation updates</p>
1937+
<p>Use MVVM architecture Create: ContentView BillViewModel Use @StateObject for ViewMode Validate numeric input safely Prevent crashes from invalid text input Use computed properties for calculations Format currency using NumberFormatter Avoid UIKit unless absolutely necessary Bonus Features (if possible) Round up per-person amount toggle Persist last used tip percentage using @AppStorage Add subtle animation when totals change Add haptic feedback when calculation updates</p>
19381938
<h3 id="deliverables">Deliverables</h3>
19391939
<p>Provide: Full Swift code (ready to paste into Xcode) File structure explanation Brief explanation of architecture decisions Comments in code explaining key logic Make the code production-quality, clean, and well-structured.</p>
19401940
</section>
@@ -2293,11 +2293,11 @@ <h2>Download and Install Ollama</h2>
22932293
<h1>Qwen 3.5</h1>
22942294
<p>Qwen 3.5 was in the news last week for running on small local installations and rivalling much larger models</p>
22952295
</section>
2296-
<section id="fetch-deepseek-r1" class="slide level2">
2297-
<h2>Fetch DeepSeek R1</h2>
2298-
<p>Pull the DeepSeek R1 model onto your machine:</p>
2296+
<section id="fetch-qwen-3.5" class="slide level2">
2297+
<h2>Fetch Qwen 3.5</h2>
2298+
<p>Pull the Qwen 3.5 model onto your machine:</p>
22992299
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb3"><pre class="sourceCode numberSource bash number-lines code-with-copy"><code class="sourceCode bash"><span id="cb3-1"><a href></a><span class="ex">ollama</span> pull qwen3.5:9b</span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
2300-
<p>This downloads the 9B Qwen 3.5 model (which is 6.6GB). If you’re interested in a specific distilled variant (e.g., 1.5B, 7B, 14B), or the full 671B parameter model (671b, which is 404GB) just specify its tag, obtained from <a href="https://ollama.com/library/qwen3.5">https://ollama.com/library/qwen3.5</a></p>
2300+
<p>This downloads the 9B Qwen 3.5 model (which is 6.6GB). If you’re interested in a specific distilled variant, or the full model just specify its tag, obtained from <a href="https://ollama.com/library/qwen3.5">https://ollama.com/library/qwen3.5</a></p>
23012301
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb4"><pre class="sourceCode numberSource bash number-lines code-with-copy"><code class="sourceCode bash"><span id="cb4-1"><a href></a><span class="ex">ollama</span> pull qwen3.5:27b</span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
23022302
</section>
23032303
<section id="run-qwen-3.5" class="slide level2">
@@ -2313,7 +2313,7 @@ <h2>Start using Qwen 3.5.</h2>
23132313
<p>Or, to run the 27B model:</p>
23142314
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb7"><pre class="sourceCode numberSource bash number-lines code-with-copy"><code class="sourceCode bash"><span id="cb7-1"><a href></a><span class="ex">ollama</span> run qwen3.5:27b</span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
23152315
<p>Or, to prompt the model:</p>
2316-
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb8"><pre class="sourceCode numberSource bash number-lines code-with-copy"><code class="sourceCode bash"><span id="cb8-1"><a href></a><span class="ex">ollama</span> run deepseek-r1 <span class="st">&quot;What is the latest news on Rust programming language trends?&quot;</span></span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
2316+
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb8"><pre class="sourceCode numberSource bash number-lines code-with-copy"><code class="sourceCode bash"><span id="cb8-1"><a href></a><span class="ex">ollama</span> run qwen3.5:9b <span class="st">&quot;What is an LLM?&quot;</span></span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
23172317
</section>
23182318
<section id="model-location" class="slide level2">
23192319
<h2>Model location</h2>
@@ -2348,7 +2348,7 @@ <h2>Also needed</h2>
23482348
<h1>The chatbot</h1>
23492349
<p>We now turn our attention to the <code>localRAGchatbot.qmd</code> file. You must download that file from Canvas, along with <code>Xiao2025.pdf</code>. This latter file is a book, <span class="citation" data-cites="Xiao2025">Xiao and Zhu (<a href="#/references" role="doc-biblioref" onclick>2025</a>)</span>.</p>
23502350
<p>The first thing to do is to copy and paste the <code>pip install ...</code> commands into a terminal window. Then you can try to render the <code>localRAGchatbot.qmd</code> file in RStudio.</p>
2351-
<p>If you can’t render the file, there may be several reasons. The first thing to try is to download the <code>localRAGchatbot.py</code> file and try to run that in Python by saying <code>python localRAGchatbot.py</code> at a terminal prompt. It takes about seven minutes to run on my machine. If that doesn’t work, the problem may be in your Python installation. If it does work, the problem may be in your RStudio installation.</p>
2351+
<p>If you can’t render the file, there may be several reasons. The first thing to try is to download the <code>localRAGchatbot3.py</code> file and try to run that in Python by saying <code>python localRAGchatbot3.py</code> at a terminal prompt. It takes about seven minutes to run on my machine. If that doesn’t work, the problem may be in your Python installation. If it does work, the problem may be in your RStudio installation.</p>
23522352
</section>
23532353

23542354
<section id="end" class="title-slide slide level1 center">

0 commit comments

Comments
 (0)