I have discovered that its possiblle to generatre graphs on the fly internallly within a model with a simple Prompt
here is an example in which i invoke the ReaCt Prompt Loop !
1. **Question**: {Insert user question here}
2. **Thought**: Think step by step about how to approach this question.
3. **Action**: Determine what action to take next:
- [Search]: Look for relevant information online.
- [Analyze]: Break down the problem into smaller parts.
- [Summarize]: Provide a summary of known facts related to the question.
4. **Action Input**: Specify any details needed for the action.
5. **Observation**: Describe what was found or learned from the action taken.
Repeat steps 2-5 as necessary to refine your answer.
6. **Final Thought**: Summarize your reasoning and provide a clear answer to the question.
In this prompt you will note an inner prompt !
this is the prompt within the action !
here we can state a methodology ad even a loop , so we can deploy a refiner in the loop or even a tester component : like so !
1. **Question**: {Insert user question here}
2. **Thought**: Think step by step about how to approach this question.
3. **Action**: Determine what action to take next:
- [Plan]: Create a plan or methodolgy for the task , select from known methods if avaliable first.
- [Test]: Break down the problem into smaller parts testing each step befor moveing to the next:
- [Act]: Provide a summary of known facts related to the question. generate full answere from sucessfull steps :
4. **Action Input**: Specify any details needed for the action.
5. **Observation**: Describe what was found or learned from the action taken.
Repeat steps 2-5 as necessary to refine your answer.
6. **Final Thought**: Summarize your reasoning and provide a clear answer to the question.
Here we can even specify the graph nodes as actions !
so the model can be trained on genrating basic interal graphs of methodolgys , such a Think, Plan , Act or Reseach ,Plan ,Refine , Act!
hence now ewe give the model a method to generate methods !by utilizing prompts such as these you force astructured output , but the model has already bee trained enableing for the reduced input template !
we need larger inputs taylored to own own use and not to be piggy backked by hidden promptS:
Now we embedd the React Process intot the actual model and train it on these proceses : And fine tue the internal process :
Once we achive a very over fit state we can remove the template and retun to a simepl alpac template for training !
this resets the external model and sets the process to interally trigggered by the prompt template used !
hece now we can just look at your existing langchain models and prompt them to this effect removeing the graphs as the model will generate internally and utilze and tools you deploy !
also it will show its process using the react frame work !
Lovely style as i loike the react process ( after you get used to it it make the output becoem highly formatted)
now we can add new methodolgys by only slightly adjusting the prompt !
I have found that models are highly prompt sensitive !
a moistake in the prompt can slow training ! and a drastic chage in th eprompt can basically resart all progress to zero and carry the model away form it existing models !
SO defineing universal templates such as these enables for slight changes ie varistions on tools as well as method imposed , but also can truely increase respose seed because of the non usage of the graph setup ! and now the process is internally genenrated and only the tools are used rather than a collection of agents the model witl use itself !