<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://docs.foji.io/index.php?action=history&amp;feed=atom&amp;title=AI_Question_Node_in_Pathways</id>
	<title>AI Question Node in Pathways - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://docs.foji.io/index.php?action=history&amp;feed=atom&amp;title=AI_Question_Node_in_Pathways"/>
	<link rel="alternate" type="text/html" href="https://docs.foji.io/index.php?title=AI_Question_Node_in_Pathways&amp;action=history"/>
	<updated>2026-06-22T03:55:35Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.40.1</generator>
	<entry>
		<id>https://docs.foji.io/index.php?title=AI_Question_Node_in_Pathways&amp;diff=2713&amp;oldid=prev</id>
		<title>Mitchell.Hirsche: Mitchell.Hirsche moved page Documentation for the &quot;AI Question&quot; Node in Pathways to AI Question Node in Pathways</title>
		<link rel="alternate" type="text/html" href="https://docs.foji.io/index.php?title=AI_Question_Node_in_Pathways&amp;diff=2713&amp;oldid=prev"/>
		<updated>2025-03-05T22:44:34Z</updated>

		<summary type="html">&lt;p&gt;Mitchell.Hirsche moved page &lt;a href=&quot;/wiki/Documentation_for_the_%22AI_Question%22_Node_in_Pathways&quot; class=&quot;mw-redirect&quot; title=&quot;Documentation for the &amp;quot;AI Question&amp;quot; Node in Pathways&quot;&gt;Documentation for the &amp;quot;AI Question&amp;quot; Node in Pathways&lt;/a&gt; to &lt;a href=&quot;/wiki/AI_Question_Node_in_Pathways&quot; title=&quot;AI Question Node in Pathways&quot;&gt;AI Question Node in Pathways&lt;/a&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 22:44, 5 March 2025&lt;/td&gt;
				&lt;/tr&gt;
&lt;!-- diff cache key wiki:diff::1.12:old-2624:rev-2713 --&gt;
&lt;/table&gt;</summary>
		<author><name>Mitchell.Hirsche</name></author>
	</entry>
	<entry>
		<id>https://docs.foji.io/index.php?title=AI_Question_Node_in_Pathways&amp;diff=2624&amp;oldid=prev</id>
		<title>Mitchell.Hirsche: AI Questions</title>
		<link rel="alternate" type="text/html" href="https://docs.foji.io/index.php?title=AI_Question_Node_in_Pathways&amp;diff=2624&amp;oldid=prev"/>
		<updated>2025-03-04T23:21:54Z</updated>

		<summary type="html">&lt;p&gt;AI Questions&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;The &amp;#039;&amp;#039;&amp;#039;AI Question&amp;#039;&amp;#039;&amp;#039; node in FojiSoft Pathways allows users to leverage AI for dynamic data extraction, processing, and decision-making within workflows. This updated documentation includes additional configuration options based on the latest enhancements.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== &amp;#039;&amp;#039;&amp;#039;Node Properties&amp;#039;&amp;#039;&amp;#039; ===&lt;br /&gt;
&lt;br /&gt;
==== &amp;#039;&amp;#039;&amp;#039;1. Name&amp;#039;&amp;#039;&amp;#039; ====&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Description&amp;#039;&amp;#039;&amp;#039;: A unique identifier for the AI Question node within the workflow.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Usage&amp;#039;&amp;#039;&amp;#039;: Use a clear, descriptive name to indicate the purpose of the AI Question (e.g., &amp;quot;Extract Patient Data&amp;quot; or &amp;quot;Process Insurance Claim&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== &amp;#039;&amp;#039;&amp;#039;2. Prompt Expression&amp;#039;&amp;#039;&amp;#039; ====&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Type&amp;#039;&amp;#039;&amp;#039;: Handlebar Template or Script&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Description&amp;#039;&amp;#039;&amp;#039;: Defines the input for the AI model. This can be a dynamic template with variables or a script for advanced logic.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Options&amp;#039;&amp;#039;&amp;#039;:&lt;br /&gt;
*# &amp;#039;&amp;#039;&amp;#039;Handlebars Template&amp;#039;&amp;#039;&amp;#039;: Use placeholders (e.g., &amp;lt;nowiki&amp;gt;{{variable_name}}&amp;lt;/nowiki&amp;gt;) to insert dynamic values.&lt;br /&gt;
*# &amp;#039;&amp;#039;&amp;#039;Script&amp;#039;&amp;#039;&amp;#039;: Write custom scripts in supported programming languages (e.g., Python or JavaScript) for more advanced logic.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Status&amp;#039;&amp;#039;&amp;#039;: Required field (must be filled for the node to function).&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Example&amp;#039;&amp;#039;&amp;#039; (Handlebars Template):&lt;br /&gt;
&lt;br /&gt;
Extract the patient&amp;#039;s name, insurance ID, and billing amount from the following text: &amp;lt;nowiki&amp;gt;{{document_text}}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Example&amp;#039;&amp;#039;&amp;#039; (Script):&lt;br /&gt;
&lt;br /&gt;
python&lt;br /&gt;
&lt;br /&gt;
CopyEdit&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt; Script to preprocess and extract specific fields&lt;br /&gt;
&lt;br /&gt;
import json&lt;br /&gt;
&lt;br /&gt;
extracted_data = extract_fields(document_text)&lt;br /&gt;
&lt;br /&gt;
json.dumps(extracted_data)&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== &amp;#039;&amp;#039;&amp;#039;3. System Prompt Expression&amp;#039;&amp;#039;&amp;#039; ====&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Type&amp;#039;&amp;#039;&amp;#039;: Default or Script&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Description&amp;#039;&amp;#039;&amp;#039;: Allows customization of the AI model&amp;#039;s underlying system instructions to tailor the behavior for specific tasks.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Options&amp;#039;&amp;#039;&amp;#039;:&lt;br /&gt;
*# &amp;#039;&amp;#039;&amp;#039;Default&amp;#039;&amp;#039;&amp;#039;: Uses pre-configured general-purpose instructions.&lt;br /&gt;
*# &amp;#039;&amp;#039;&amp;#039;Script&amp;#039;&amp;#039;&amp;#039;: Define custom system prompts or logic for specialized tasks (e.g., creating custom data pipelines or fine-tuning results).&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Example&amp;#039;&amp;#039;&amp;#039; (Script):&lt;br /&gt;
&lt;br /&gt;
system_instructions = &amp;quot;You are an AI assistant specialized in processing medical claims. Focus on extracting structured data accurately.&amp;quot;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== &amp;#039;&amp;#039;&amp;#039;4. Response Variable&amp;#039;&amp;#039;&amp;#039; ====&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Description&amp;#039;&amp;#039;&amp;#039;: Specifies the variable name where the output from the AI node will be stored.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Usage&amp;#039;&amp;#039;&amp;#039;: Use a meaningful variable name to store outputs for downstream nodes (e.g., claim_details or invoice_data).&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Default Value&amp;#039;&amp;#039;&amp;#039;: Extracted data in structured format (JSON)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== &amp;#039;&amp;#039;&amp;#039;5. Response Type&amp;#039;&amp;#039;&amp;#039; ====&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Options&amp;#039;&amp;#039;&amp;#039;: Text or JSON&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Description&amp;#039;&amp;#039;&amp;#039;: Determines the format of the AI’s output.&lt;br /&gt;
*# &amp;#039;&amp;#039;&amp;#039;Text&amp;#039;&amp;#039;&amp;#039;: Produces a plain-text output, suitable for unstructured data or summaries.&lt;br /&gt;
*# &amp;#039;&amp;#039;&amp;#039;JSON&amp;#039;&amp;#039;&amp;#039;: Produces structured data in JSON format, ideal for workflows requiring precise field mapping.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Recommendation&amp;#039;&amp;#039;&amp;#039;: Use JSON for structured tasks like data extraction, and Text for general insights.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== &amp;#039;&amp;#039;&amp;#039;6. Max Tokens&amp;#039;&amp;#039;&amp;#039; ====&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Default Value&amp;#039;&amp;#039;&amp;#039;: 16,384&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Description&amp;#039;&amp;#039;&amp;#039;: Sets the maximum length of the AI&amp;#039;s output. Adjust based on the task&amp;#039;s complexity.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Recommendation&amp;#039;&amp;#039;&amp;#039;: Use higher tokens for complex, detailed responses and lower tokens for concise outputs.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== &amp;#039;&amp;#039;&amp;#039;7. Model&amp;#039;&amp;#039;&amp;#039; ====&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Options&amp;#039;&amp;#039;&amp;#039;: Standard or Advanced&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Description&amp;#039;&amp;#039;&amp;#039;:&lt;br /&gt;
*# &amp;#039;&amp;#039;&amp;#039;Standard&amp;#039;&amp;#039;&amp;#039;: A balanced model for general-purpose tasks.&lt;br /&gt;
*# &amp;#039;&amp;#039;&amp;#039;Advanced&amp;#039;&amp;#039;&amp;#039;: Optimized for complex tasks, offering higher accuracy and better handling of nuanced instructions.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Recommendation&amp;#039;&amp;#039;&amp;#039;: Use &amp;#039;&amp;#039;&amp;#039;Advanced&amp;#039;&amp;#039;&amp;#039; for tasks requiring precision and complexity (e.g., medical data extraction).&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== &amp;#039;&amp;#039;&amp;#039;8. Creativity Level&amp;#039;&amp;#039;&amp;#039; ====&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Default Value&amp;#039;&amp;#039;&amp;#039;: 1&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Description&amp;#039;&amp;#039;&amp;#039;: Controls the creative freedom of the AI. Higher values result in diverse, less deterministic responses; lower values ensure consistency.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Recommendation&amp;#039;&amp;#039;&amp;#039;: Keep this at &amp;#039;&amp;#039;&amp;#039;1&amp;#039;&amp;#039;&amp;#039; for structured tasks requiring deterministic outputs.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== &amp;#039;&amp;#039;&amp;#039;9. Web Access&amp;#039;&amp;#039;&amp;#039; ====&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Options&amp;#039;&amp;#039;&amp;#039;: Blocked or Allowed&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Description&amp;#039;&amp;#039;&amp;#039;:&lt;br /&gt;
*# &amp;#039;&amp;#039;&amp;#039;Blocked&amp;#039;&amp;#039;&amp;#039;: The AI processes only local inputs and pre-trained knowledge.&lt;br /&gt;
*# &amp;#039;&amp;#039;&amp;#039;Allowed&amp;#039;&amp;#039;&amp;#039;: Enables the AI to fetch real-time data from the web to supplement the response.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Example Use Case&amp;#039;&amp;#039;&amp;#039;: Fetch current insurance policy updates or check claim submission guidelines dynamically.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== &amp;#039;&amp;#039;&amp;#039;How It Works&amp;#039;&amp;#039;&amp;#039; ===&lt;br /&gt;
&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;Input&amp;#039;&amp;#039;&amp;#039;: Provide a text or structured prompt through the &amp;#039;&amp;#039;&amp;#039;Prompt Expression&amp;#039;&amp;#039;&amp;#039; field.&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;Processing&amp;#039;&amp;#039;&amp;#039;: The AI interprets the input, applies any defined system-level instructions, and generates a response.&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;Output&amp;#039;&amp;#039;&amp;#039;: The response is stored in the variable defined in the &amp;#039;&amp;#039;&amp;#039;Response Variable&amp;#039;&amp;#039;&amp;#039; field for downstream use.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== &amp;#039;&amp;#039;&amp;#039;Example Usage&amp;#039;&amp;#039;&amp;#039; ===&lt;br /&gt;
&lt;br /&gt;
==== &amp;#039;&amp;#039;&amp;#039;Scenario: Extracting Data from an Insurance Document&amp;#039;&amp;#039;&amp;#039; ====&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Prompt Expression (Handlebars Template)&amp;#039;&amp;#039;&amp;#039;:&lt;br /&gt;
&lt;br /&gt;
Extract the following details: patient&amp;#039;s name, insurance ID, claim amount, and service date. Text: &amp;lt;nowiki&amp;gt;{{uploaded_document}}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;Response Type&amp;#039;&amp;#039;&amp;#039;: JSON&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Expected Output&amp;#039;&amp;#039;&amp;#039;:&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;patient_name&amp;quot;: &amp;quot;John Doe&amp;quot;,&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;insurance_id&amp;quot;: &amp;quot;123456789&amp;quot;,&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;claim_amount&amp;quot;: &amp;quot;$500&amp;quot;,&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;service_date&amp;quot;: &amp;quot;2025-01-31&amp;quot;&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== &amp;#039;&amp;#039;&amp;#039;Best Practices&amp;#039;&amp;#039;&amp;#039; ===&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Dynamic Prompts&amp;#039;&amp;#039;&amp;#039;: Use placeholders in Handlebar templates for flexible input handling.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Structured Output&amp;#039;&amp;#039;&amp;#039;: Choose JSON response type for workflows requiring precise field mapping.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Advanced Model&amp;#039;&amp;#039;&amp;#039;: Use the Advanced model for complex tasks like medical billing or legal data extraction.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Web Access&amp;#039;&amp;#039;&amp;#039;: Enable web access for tasks requiring real-time updates or external data validation.&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;AI Question&amp;#039;&amp;#039;&amp;#039; node, now enhanced with script-based prompts, advanced models, and real-time web capabilities, is a cornerstone for creating intelligent and adaptive workflows in Pathways.&lt;br /&gt;
[[Category:ForgeAI]]&lt;br /&gt;
[[Category:Pathways]]&lt;/div&gt;</summary>
		<author><name>Mitchell.Hirsche</name></author>
	</entry>
</feed>