<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.bioinsights.com/w/index.php?action=history&amp;feed=atom&amp;title=Documentation%2FProgress_Notes</id>
	<title>Documentation/Progress Notes - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.bioinsights.com/w/index.php?action=history&amp;feed=atom&amp;title=Documentation%2FProgress_Notes"/>
	<link rel="alternate" type="text/html" href="https://wiki.bioinsights.com/w/index.php?title=Documentation/Progress_Notes&amp;action=history"/>
	<updated>2026-05-06T10:04:40Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://wiki.bioinsights.com/w/index.php?title=Documentation/Progress_Notes&amp;diff=299&amp;oldid=prev</id>
		<title>Serdar.sanri: /* 9. Related documentation */</title>
		<link rel="alternate" type="text/html" href="https://wiki.bioinsights.com/w/index.php?title=Documentation/Progress_Notes&amp;diff=299&amp;oldid=prev"/>
		<updated>2026-02-26T18:43:09Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;9. Related documentation&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 18:43, 26 February 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l211&quot;&gt;Line 211:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 211:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* The &amp;#039;&amp;#039;&amp;#039;number of chunks&amp;#039;&amp;#039;&amp;#039; used is &amp;#039;&amp;#039;&amp;#039;configurable&amp;#039;&amp;#039;&amp;#039; (&amp;lt;code&amp;gt;SOLR_RAG_CHUNK_LIMIT&amp;lt;/code&amp;gt;), so you can tune how much document material the AI sees.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* The &amp;#039;&amp;#039;&amp;#039;number of chunks&amp;#039;&amp;#039;&amp;#039; used is &amp;#039;&amp;#039;&amp;#039;configurable&amp;#039;&amp;#039;&amp;#039; (&amp;lt;code&amp;gt;SOLR_RAG_CHUNK_LIMIT&amp;lt;/code&amp;gt;), so you can tune how much document material the AI sees.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;#039;&amp;#039;&amp;#039;Patient documents&amp;#039;&amp;#039;&amp;#039; are always used via RAG (semantic search); personality and template documents can be either full content or RAG.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;#039;&amp;#039;&amp;#039;Patient documents&amp;#039;&amp;#039;&amp;#039; are always used via RAG (semantic search); personality and template documents can be either full content or RAG.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;-----&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;span id=&quot;related-documentation&quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;== 9. Related documentation ==&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &#039;&#039;&#039;System overview (Solr and vector store)&#039;&#039;&#039;: &amp;lt;code&amp;gt;docs/system/09-solr-and-vector-store.md&amp;lt;/code&amp;gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &#039;&#039;&#039;Solr vector RAG quick reference&#039;&#039;&#039;: &amp;lt;code&amp;gt;docs/SOLR_Vector_RAG_Quick_Reference.md&amp;lt;/code&amp;gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &#039;&#039;&#039;Architecture decision and implementation&#039;&#039;&#039;: &amp;lt;code&amp;gt;docs/SOLR_Vector_RAG_Architecture_Decision.md&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;docs/SOLR_Vector_RAG_Implementation_Plan.md&amp;lt;/code&amp;gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &#039;&#039;&#039;Configuration reference&#039;&#039;&#039;: &amp;lt;code&amp;gt;docs/system/10-configuration-reference.md&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;env.ts&amp;lt;/code&amp;gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key Bioinsights Wiki:diff:1.41:old-298:rev-299:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Serdar.sanri</name></author>
	</entry>
	<entry>
		<id>https://wiki.bioinsights.com/w/index.php?title=Documentation/Progress_Notes&amp;diff=298&amp;oldid=prev</id>
		<title>Serdar.sanri: /* 7. Configuration (for operations / team) */</title>
		<link rel="alternate" type="text/html" href="https://wiki.bioinsights.com/w/index.php?title=Documentation/Progress_Notes&amp;diff=298&amp;oldid=prev"/>
		<updated>2026-02-26T18:42:52Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;7. Configuration (for operations / team)&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 18:42, 26 February 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l185&quot;&gt;Line 185:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 185:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Relevant environment variables:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Relevant environment variables:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{|&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{| &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;class=&quot;wikitable&quot;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;!width=&amp;quot;13%&amp;quot;| Variable&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;!width=&amp;quot;13%&amp;quot;| Variable&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;!width=&amp;quot;43%&amp;quot;| Purpose&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;!width=&amp;quot;43%&amp;quot;| Purpose&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key Bioinsights Wiki:diff:1.41:old-297:rev-298:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Serdar.sanri</name></author>
	</entry>
	<entry>
		<id>https://wiki.bioinsights.com/w/index.php?title=Documentation/Progress_Notes&amp;diff=297&amp;oldid=prev</id>
		<title>Serdar.sanri: /* 3. Attachment modes: “Full content” vs “RAG” */</title>
		<link rel="alternate" type="text/html" href="https://wiki.bioinsights.com/w/index.php?title=Documentation/Progress_Notes&amp;diff=297&amp;oldid=prev"/>
		<updated>2026-02-26T18:42:33Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;3. Attachment modes: “Full content” vs “RAG”&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 18:42, 26 February 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l67&quot;&gt;Line 67:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 67:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;When you attach a file to a &amp;#039;&amp;#039;&amp;#039;personality&amp;#039;&amp;#039;&amp;#039; or a &amp;#039;&amp;#039;&amp;#039;progress note template&amp;#039;&amp;#039;&amp;#039;, you can choose how that file is used:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;When you attach a file to a &amp;#039;&amp;#039;&amp;#039;personality&amp;#039;&amp;#039;&amp;#039; or a &amp;#039;&amp;#039;&amp;#039;progress note template&amp;#039;&amp;#039;&amp;#039;, you can choose how that file is used:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{|&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{| &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;class=&quot;wikitable&quot;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;!width=&amp;quot;6%&amp;quot;| Mode&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;!width=&amp;quot;6%&amp;quot;| Mode&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;!width=&amp;quot;48%&amp;quot;| What it means&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;!width=&amp;quot;48%&amp;quot;| What it means&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key Bioinsights Wiki:diff:1.41:old-296:rev-297:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Serdar.sanri</name></author>
	</entry>
	<entry>
		<id>https://wiki.bioinsights.com/w/index.php?title=Documentation/Progress_Notes&amp;diff=296&amp;oldid=prev</id>
		<title>Serdar.sanri at 18:41, 26 February 2026</title>
		<link rel="alternate" type="text/html" href="https://wiki.bioinsights.com/w/index.php?title=Documentation/Progress_Notes&amp;diff=296&amp;oldid=prev"/>
		<updated>2026-02-26T18:41:35Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;a href=&quot;https://wiki.bioinsights.com/w/index.php?title=Documentation/Progress_Notes&amp;amp;diff=296&amp;amp;oldid=295&quot;&gt;Show changes&lt;/a&gt;</summary>
		<author><name>Serdar.sanri</name></author>
	</entry>
	<entry>
		<id>https://wiki.bioinsights.com/w/index.php?title=Documentation/Progress_Notes&amp;diff=295&amp;oldid=prev</id>
		<title>Serdar.sanri: Replaced content with &quot;= AI Attachments and RAG: End-to-End Guide =  == 1. Purpose and scope ==  == 2. High-level overview ==  == 3. Attachment modes: “Full content” vs “RAG” ==  == 4. How documents are prepared for the AI ==  === 4.1 Storing and indexing ===  === 4.2 Full-content path ===  === 4.3 RAG path ===  == 5. How RAG retrieval works ==  === 5.1 Multi-query retrieval ===  === 5.2 Deduplication and limit ===  === 5.3 Where the chunk limit came from ===  === 5.4 Context budge...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.bioinsights.com/w/index.php?title=Documentation/Progress_Notes&amp;diff=295&amp;oldid=prev"/>
		<updated>2026-02-26T18:38:20Z</updated>

		<summary type="html">&lt;p&gt;Replaced content with &amp;quot;= AI Attachments and RAG: End-to-End Guide =  == 1. Purpose and scope ==  == 2. High-level overview ==  == 3. Attachment modes: “Full content” vs “RAG” ==  == 4. How documents are prepared for the AI ==  === 4.1 Storing and indexing ===  === 4.2 Full-content path ===  === 4.3 RAG path ===  == 5. How RAG retrieval works ==  === 5.1 Multi-query retrieval ===  === 5.2 Deduplication and limit ===  === 5.3 Where the chunk limit came from ===  === 5.4 Context budge...&amp;quot;&lt;/p&gt;
&lt;a href=&quot;https://wiki.bioinsights.com/w/index.php?title=Documentation/Progress_Notes&amp;amp;diff=295&amp;amp;oldid=294&quot;&gt;Show changes&lt;/a&gt;</summary>
		<author><name>Serdar.sanri</name></author>
	</entry>
	<entry>
		<id>https://wiki.bioinsights.com/w/index.php?title=Documentation/Progress_Notes&amp;diff=294&amp;oldid=prev</id>
		<title>Serdar.sanri at 18:37, 26 February 2026</title>
		<link rel="alternate" type="text/html" href="https://wiki.bioinsights.com/w/index.php?title=Documentation/Progress_Notes&amp;diff=294&amp;oldid=prev"/>
		<updated>2026-02-26T18:37:24Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 18:37, 26 February 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;!-- Wiki format: MediaWiki (Wikipedia-style). Headers: = = and == ==; bold: &#039;&#039;&#039; &#039;&#039;&#039;; italic: &#039;&#039; &#039;&#039;; code: &amp;lt;code&amp;gt; &amp;lt;/code&amp;gt;; tables: {| |- |}; lists: * #. For Confluence: replace = with h1., == with h2., === with h3.; &#039;&#039;&#039; with *; &amp;lt;code&amp;gt; with {{ }} or {code}. --&amp;gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;= AI Attachments and RAG: End-to-End Guide =&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;= AI Attachments and RAG: End-to-End Guide =&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key Bioinsights Wiki:diff:1.41:old-293:rev-294:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Serdar.sanri</name></author>
	</entry>
	<entry>
		<id>https://wiki.bioinsights.com/w/index.php?title=Documentation/Progress_Notes&amp;diff=293&amp;oldid=prev</id>
		<title>Serdar.sanri: Created page with &quot;&lt;!-- Wiki format: MediaWiki (Wikipedia-style). Headers: = = and == ==; bold: &#039;&#039;&#039; &#039;&#039;&#039;; italic: &#039;&#039; &#039;&#039;; code: &lt;code&gt; &lt;/code&gt;; tables: {| |- |}; lists: * #. For Confluence: replace = with h1., == with h2., === with h3.; &#039;&#039;&#039; with *; &lt;code&gt; with {{ }} or {code}. --&gt; = AI Attachments and RAG: End-to-End Guide =  This document explains how the BioInsights AI uses attached documents (personality files, progress note templates, and patient documents) when generating progress notes...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.bioinsights.com/w/index.php?title=Documentation/Progress_Notes&amp;diff=293&amp;oldid=prev"/>
		<updated>2026-02-19T21:24:20Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;lt;!-- Wiki format: MediaWiki (Wikipedia-style). Headers: = = and == ==; bold: &amp;#039;&amp;#039;&amp;#039; &amp;#039;&amp;#039;&amp;#039;; italic: &amp;#039;&amp;#039; &amp;#039;&amp;#039;; code: &amp;lt;code&amp;gt; &amp;lt;/code&amp;gt;; tables: {| |- |}; lists: * #. For Confluence: replace = with h1., == with h2., === with h3.; &amp;#039;&amp;#039;&amp;#039; with *; &amp;lt;code&amp;gt; with {{ }} or {code}. --&amp;gt; = AI Attachments and RAG: End-to-End Guide =  This document explains how the BioInsights AI uses attached documents (personality files, progress note templates, and patient documents) when generating progress notes...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;!-- Wiki format: MediaWiki (Wikipedia-style). Headers: = = and == ==; bold: &amp;#039;&amp;#039;&amp;#039; &amp;#039;&amp;#039;&amp;#039;; italic: &amp;#039;&amp;#039; &amp;#039;&amp;#039;; code: &amp;lt;code&amp;gt; &amp;lt;/code&amp;gt;; tables: {| |- |}; lists: * #. For Confluence: replace = with h1., == with h2., === with h3.; &amp;#039;&amp;#039;&amp;#039; with *; &amp;lt;code&amp;gt; with {{ }} or {code}. --&amp;gt;&lt;br /&gt;
= AI Attachments and RAG: End-to-End Guide =&lt;br /&gt;
&lt;br /&gt;
This document explains how the BioInsights AI uses attached documents (personality files, progress note templates, and patient documents) when generating progress notes. It is intended for &amp;#039;&amp;#039;&amp;#039;teams&amp;#039;&amp;#039;&amp;#039; (product, engineering, support) and &amp;#039;&amp;#039;&amp;#039;clients&amp;#039;&amp;#039;&amp;#039; who need a clear picture of how the system works, what the &amp;quot;Full content&amp;quot; vs &amp;quot;RAG&amp;quot; toggle means, and how retrieval is performed.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== 1. Purpose and scope ==&lt;br /&gt;
&lt;br /&gt;
When generating an AI progress note, the system can use:&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Personality documents&amp;#039;&amp;#039;&amp;#039; – Guidelines, tone, and instructions attached to an AI personality.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Template documents&amp;#039;&amp;#039;&amp;#039; – Instructions and structure attached to a progress note template.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Patient documents&amp;#039;&amp;#039;&amp;#039; – Files attached to the current encounter (e.g. lab results, referrals).&lt;br /&gt;
&lt;br /&gt;
The AI does &amp;#039;&amp;#039;&amp;#039;not&amp;#039;&amp;#039;&amp;#039; receive raw file binaries. Instead, it receives &amp;#039;&amp;#039;&amp;#039;text&amp;#039;&amp;#039;&amp;#039; that comes from those documents in one of two ways:&lt;br /&gt;
&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;Full content&amp;#039;&amp;#039;&amp;#039; – The entire document text is fetched and placed in the AI&amp;#039;s context.&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;RAG (Retrieval-Augmented Generation)&amp;#039;&amp;#039;&amp;#039; – Only the most relevant parts of the document (chunks) are retrieved using semantic search and then added to the context.&lt;br /&gt;
&lt;br /&gt;
This guide describes both modes, how documents are prepared (indexing, chunking), how retrieval works (including multi-query and the configurable chunk limit), and the end-to-end flow from setup to AI response.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== 2. High-level overview ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
+-----------------------------------------------------------------------------+&lt;br /&gt;
|  Admin configures personality / template with attached files                 |&lt;br /&gt;
|  -&amp;gt; Each file can be &amp;quot;Full content&amp;quot; or &amp;quot;RAG only&amp;quot;                            |&lt;br /&gt;
+-----------------------------------------------------------------------------+&lt;br /&gt;
                                        |&lt;br /&gt;
                                        v&lt;br /&gt;
+-----------------------------------------------------------------------------+&lt;br /&gt;
|  Documents are stored and indexed                                            |&lt;br /&gt;
|  -&amp;gt; Full content: read at request time via Document Extractor                |&lt;br /&gt;
|  -&amp;gt; RAG: split into chunks, embedded, stored in Solr vector store            |&lt;br /&gt;
+-----------------------------------------------------------------------------+&lt;br /&gt;
                                        |&lt;br /&gt;
                                        v&lt;br /&gt;
+-----------------------------------------------------------------------------+&lt;br /&gt;
|  User runs AI progress note (with conversation + optional patient files)     |&lt;br /&gt;
+-----------------------------------------------------------------------------+&lt;br /&gt;
                                        |&lt;br /&gt;
                                        v&lt;br /&gt;
+-----------------------------------------------------------------------------+&lt;br /&gt;
|  System builds AI context:                                                   |&lt;br /&gt;
|  * Full-content files -&amp;gt; full text injected into system prompt               |&lt;br /&gt;
|  * RAG files -&amp;gt; semantic search over conversation messages -&amp;gt; top chunks     |&lt;br /&gt;
|  * Patient docs -&amp;gt; same RAG retrieval (vector search by patient + file IDs)   |&lt;br /&gt;
+-----------------------------------------------------------------------------+&lt;br /&gt;
                                        |&lt;br /&gt;
                                        v&lt;br /&gt;
+-----------------------------------------------------------------------------+&lt;br /&gt;
|  OpenAI API is called with augmented prompt (no file_search tool)              |&lt;br /&gt;
|  -&amp;gt; AI generates the note using only the provided context                    |&lt;br /&gt;
+-----------------------------------------------------------------------------+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== 3. Attachment modes: &amp;quot;Full content&amp;quot; vs &amp;quot;RAG&amp;quot; ==&lt;br /&gt;
&lt;br /&gt;
When you attach a file to a &amp;#039;&amp;#039;&amp;#039;personality&amp;#039;&amp;#039;&amp;#039; or a &amp;#039;&amp;#039;&amp;#039;progress note template&amp;#039;&amp;#039;&amp;#039;, you can choose how that file is used:&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;Mode&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;What it means&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;When to use it&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;Full content&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
| The &amp;#039;&amp;#039;&amp;#039;entire&amp;#039;&amp;#039;&amp;#039; document text is loaded and added to the AI&amp;#039;s system prompt.&lt;br /&gt;
| Short, critical docs (e.g. short guidelines, required structure) where nothing should be missed.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;RAG only&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
| The document is &amp;#039;&amp;#039;&amp;#039;not&amp;#039;&amp;#039;&amp;#039; sent in full. Only &amp;#039;&amp;#039;&amp;#039;relevant chunks&amp;#039;&amp;#039;&amp;#039; are retrieved using the current conversation and injected as context.&lt;br /&gt;
| Longer docs (e.g. long manuals, large templates) where you want the AI to focus on the parts that match the conversation.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Patient documents&amp;#039;&amp;#039;&amp;#039; (files attached to the encounter) are always retrieved via &amp;#039;&amp;#039;&amp;#039;RAG&amp;#039;&amp;#039;&amp;#039; (vector search); there is no &amp;quot;full content&amp;quot; option for them.&lt;br /&gt;
* If you do &amp;#039;&amp;#039;&amp;#039;not&amp;#039;&amp;#039;&amp;#039; set the toggle (e.g. older templates/personalities with only a list of file IDs), the system treats all non-patient attachments as &amp;#039;&amp;#039;&amp;#039;full content&amp;#039;&amp;#039;&amp;#039; for backward compatibility.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== 4. How documents are prepared for the AI ==&lt;br /&gt;
&lt;br /&gt;
=== 4.1 Storing and indexing ===&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Storage&amp;#039;&amp;#039;&amp;#039;: Files are stored in the application&amp;#039;s file storage (e.g. S3 or local drive) and linked to the personality or template (or to the patient/encounter for patient documents).&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Vector store (for RAG)&amp;#039;&amp;#039;&amp;#039;:&lt;br /&gt;
** Documents that can be used for RAG are &amp;#039;&amp;#039;&amp;#039;chunked&amp;#039;&amp;#039;&amp;#039; (split into overlapping segments of roughly 1,500 characters).&lt;br /&gt;
** Each chunk is converted into a &amp;#039;&amp;#039;&amp;#039;vector (embedding)&amp;#039;&amp;#039;&amp;#039; and stored in &amp;#039;&amp;#039;&amp;#039;Apache Solr&amp;#039;&amp;#039;&amp;#039; (vector core).&lt;br /&gt;
** When the user runs the AI, the system runs &amp;#039;&amp;#039;&amp;#039;semantic search&amp;#039;&amp;#039;&amp;#039; over these chunks using the conversation as the query (see below).&lt;br /&gt;
&lt;br /&gt;
=== 4.2 Full-content path ===&lt;br /&gt;
&lt;br /&gt;
* For files marked &amp;#039;&amp;#039;&amp;#039;&amp;quot;Full content&amp;quot;&amp;#039;&amp;#039;&amp;#039;, the system does &amp;#039;&amp;#039;&amp;#039;not&amp;#039;&amp;#039;&amp;#039; use the vector store at request time.&lt;br /&gt;
* It uses the &amp;#039;&amp;#039;&amp;#039;Document Extractor&amp;#039;&amp;#039;&amp;#039; to read the file (e.g. PDF, DOCX) and get the full text.&lt;br /&gt;
* That full text is then injected into the system prompt so the model sees the whole document.&lt;br /&gt;
&lt;br /&gt;
=== 4.3 RAG path ===&lt;br /&gt;
&lt;br /&gt;
* For files marked &amp;#039;&amp;#039;&amp;#039;&amp;quot;RAG only&amp;quot;&amp;#039;&amp;#039;&amp;#039; (and for patient documents), the system uses &amp;#039;&amp;#039;&amp;#039;only&amp;#039;&amp;#039;&amp;#039; the vector store.&lt;br /&gt;
* It does &amp;#039;&amp;#039;&amp;#039;not&amp;#039;&amp;#039;&amp;#039; send the full document. It runs a &amp;#039;&amp;#039;&amp;#039;multi-query retrieval&amp;#039;&amp;#039;&amp;#039; (see next section), then injects only the retrieved chunks into the prompt, up to a character budget.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== 5. How RAG retrieval works ==&lt;br /&gt;
&lt;br /&gt;
Previously, retrieval used &amp;#039;&amp;#039;&amp;#039;only the last&amp;#039;&amp;#039;&amp;#039; user/developer/assistant message and a &amp;#039;&amp;#039;&amp;#039;fixed&amp;#039;&amp;#039;&amp;#039; number of chunks (e.g. 20). The current behavior is:&lt;br /&gt;
&lt;br /&gt;
=== 5.1 Multi-query retrieval ===&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Every&amp;#039;&amp;#039;&amp;#039; user, developer, and assistant message in the conversation that has non-empty content is used as a separate query.&lt;br /&gt;
* For each such message:&lt;br /&gt;
** The system generates an &amp;#039;&amp;#039;&amp;#039;embedding&amp;#039;&amp;#039;&amp;#039; for that message.&lt;br /&gt;
** It runs &amp;#039;&amp;#039;&amp;#039;vector search&amp;#039;&amp;#039;&amp;#039; in Solr for:&lt;br /&gt;
*** &amp;#039;&amp;#039;&amp;#039;Non-patient files&amp;#039;&amp;#039;&amp;#039; (personality/template files that are RAG-only): search by file IDs.&lt;br /&gt;
*** &amp;#039;&amp;#039;&amp;#039;Patient files&amp;#039;&amp;#039;&amp;#039; (if present): search by patient ID and attached file IDs.&lt;br /&gt;
** Results are collected and then &amp;#039;&amp;#039;&amp;#039;merged&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=== 5.2 Deduplication and limit ===&lt;br /&gt;
&lt;br /&gt;
* Chunks are identified by a key (e.g. &amp;lt;code&amp;gt;fileId:chunkIndex&amp;lt;/code&amp;gt;). If the same chunk appears in results for multiple messages, it is &amp;#039;&amp;#039;&amp;#039;deduplicated&amp;#039;&amp;#039;&amp;#039; (one entry per chunk, keeping the best score).&lt;br /&gt;
* After merging and sorting by score, the system keeps at most &amp;#039;&amp;#039;&amp;#039;N&amp;#039;&amp;#039;&amp;#039; chunks for non-patient docs and &amp;#039;&amp;#039;&amp;#039;N&amp;#039;&amp;#039;&amp;#039; for patient docs, where &amp;#039;&amp;#039;&amp;#039;N&amp;#039;&amp;#039;&amp;#039; is the &amp;#039;&amp;#039;&amp;#039;configurable RAG chunk limit&amp;#039;&amp;#039;&amp;#039; (see Configuration below).&lt;br /&gt;
* So: &amp;quot;each message&amp;quot; improves recall (earlier context can pull in relevant chunks); the limit and deduplication keep context size and cost under control.&lt;br /&gt;
&lt;br /&gt;
=== 5.3 Where the chunk limit came from ===&lt;br /&gt;
&lt;br /&gt;
* The previous hardcoded value (e.g. 20) was an arbitrary default, not derived from a formal requirement.&lt;br /&gt;
* The design intention was always to make this &amp;#039;&amp;#039;&amp;#039;configurable&amp;#039;&amp;#039;&amp;#039; via environment (see &amp;lt;code&amp;gt;SOLR_RAG_CHUNK_LIMIT&amp;lt;/code&amp;gt; in &amp;lt;code&amp;gt;env.ts&amp;lt;/code&amp;gt;). The code now uses that setting everywhere instead of a fixed 20.&lt;br /&gt;
* Default in config is &amp;#039;&amp;#039;&amp;#039;50&amp;#039;&amp;#039;&amp;#039;; the application caps it between 1 and 500 for safety.&lt;br /&gt;
&lt;br /&gt;
=== 5.4 Context budget ===&lt;br /&gt;
&lt;br /&gt;
* Even if many chunks are retrieved, the total &amp;#039;&amp;#039;&amp;#039;character count&amp;#039;&amp;#039;&amp;#039; of the RAG context sent to the model is capped (e.g. &amp;lt;code&amp;gt;RAG_CONTEXT_MAX_CHARS&amp;lt;/code&amp;gt; or a model-specific override). Chunks are added in score order until the budget is reached; the rest are dropped and a warning is logged.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== 6. End-to-end flow (step by step) ==&lt;br /&gt;
&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;Setup (personality / template)&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
#* Admin attaches files and, for each file, chooses &amp;#039;&amp;#039;&amp;#039;Full content&amp;#039;&amp;#039;&amp;#039; or &amp;#039;&amp;#039;&amp;#039;RAG only&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
#* Data is saved (e.g. &amp;lt;code&amp;gt;file_ids&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;file_ids_full_content&amp;lt;/code&amp;gt;).&lt;br /&gt;
#* Files are stored; RAG-only (and patient) documents are chunked and indexed in Solr when the indexing pipeline runs.&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;User starts progress note&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
#* User may attach &amp;#039;&amp;#039;&amp;#039;patient documents&amp;#039;&amp;#039;&amp;#039; to the encounter.&lt;br /&gt;
#* Those are also chunked and indexed in Solr (by patient and file).&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;User runs AI&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
#* The frontend sends the conversation (messages) and options (e.g. template ID, personality ID, patient ID, attached file IDs).&lt;br /&gt;
#* Backend resolves which files are personality/template and which are patient, and which of the former are full-content vs RAG-only.&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;Building context&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
#* &amp;#039;&amp;#039;&amp;#039;Full-content (non-patient) files&amp;#039;&amp;#039;&amp;#039;: Document Extractor fetches full text; that text is added to the system prompt.&lt;br /&gt;
#* &amp;#039;&amp;#039;&amp;#039;RAG-only (non-patient) files&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;patient files&amp;#039;&amp;#039;&amp;#039;:&lt;br /&gt;
#** If there is already full-document context from step above, the system runs multi-query RAG for &amp;#039;&amp;#039;&amp;#039;RAG-only non-patient&amp;#039;&amp;#039;&amp;#039; files and appends those chunks to the system message.&lt;br /&gt;
#** If there is &amp;#039;&amp;#039;&amp;#039;no&amp;#039;&amp;#039;&amp;#039; full-document context (e.g. all attachments are RAG-only or only patient docs), the system uses the &amp;#039;&amp;#039;&amp;#039;fallback&amp;#039;&amp;#039;&amp;#039; path: multi-query RAG for both non-patient and patient files, then builds a single RAG context (chunks + file list + instructions) and injects it into the system prompt.&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;API call&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
#* The AI provider (e.g. OpenAI) is called with the &amp;#039;&amp;#039;&amp;#039;augmented&amp;#039;&amp;#039;&amp;#039; system prompt and the conversation.&lt;br /&gt;
#* No &amp;quot;file_search&amp;quot; or similar tool is used; all document content is in the prompt.&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;Response&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
#* The model generates the note using only the provided context. The UI shows the note and, where applicable, &amp;quot;Documents referenced&amp;quot; so the user knows which files were used.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== 7. Configuration (for operations / team) ==&lt;br /&gt;
&lt;br /&gt;
Relevant environment variables:&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;Variable&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;Purpose&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;Default / notes&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;SOLR_RAG_CHUNK_LIMIT&amp;lt;/code&amp;gt;&lt;br /&gt;
| Max number of chunks to retrieve per source (non-patient and patient) in RAG.&lt;br /&gt;
| Optional; default in code is 50. Capped between 1 and 500.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;RAG_CONTEXT_MAX_CHARS&amp;lt;/code&amp;gt;&lt;br /&gt;
| Max total characters of RAG context injected into the prompt.&lt;br /&gt;
| Optional; can be overridden per model with &amp;lt;code&amp;gt;RAG_CONTEXT_MAX_CHARS_&amp;amp;lt;MODEL&amp;amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Other Solr/vector and embedding settings (e.g. core name, dimensions) are documented in &amp;lt;code&amp;gt;env.ts&amp;lt;/code&amp;gt; and in the Solr/vector store docs referenced below.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== 8. Summary for clients ==&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Two ways to use a file&amp;#039;&amp;#039;&amp;#039;: &amp;quot;Full content&amp;quot; (entire document in the prompt) or &amp;quot;RAG only&amp;quot; (only the most relevant parts, based on the conversation).&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;RAG&amp;#039;&amp;#039;&amp;#039; uses the &amp;#039;&amp;#039;&amp;#039;whole conversation&amp;#039;&amp;#039;&amp;#039; (every user/assistant message) to find relevant sections, not just the last message.&lt;br /&gt;
* The &amp;#039;&amp;#039;&amp;#039;number of chunks&amp;#039;&amp;#039;&amp;#039; used is &amp;#039;&amp;#039;&amp;#039;configurable&amp;#039;&amp;#039;&amp;#039; (&amp;lt;code&amp;gt;SOLR_RAG_CHUNK_LIMIT&amp;lt;/code&amp;gt;), so you can tune how much document material the AI sees.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Patient documents&amp;#039;&amp;#039;&amp;#039; are always used via RAG (semantic search); personality and template documents can be either full content or RAG.&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Serdar.sanri</name></author>
	</entry>
</feed>