rfwarn / ASCII_LLM_Maze

Good test for LLMs to see how they navigate.
GNU General Public License v3.0
0 stars 1 forks source link

Interaction between mazes and LLMs #2

Open HeyLun1211 opened 7 months ago

HeyLun1211 commented 7 months ago

Hello,I am very interested in this issue and have tried for a while without much success. How do you make the maze interact with LLMs (Maybe OpenAI's API or ChatGPT?)? Thank you.

rfwarn commented 7 months ago

Hi, I'm glad to see someone found interest in this. Right now, it's a manual process where the user is the middleman. You start the program and copy/paste it into the LLM textbox. When the LLM tells you what move they want to take, you enter the corresponding letter and the program will print the updated map. I need to make it combine all the outputs for a response in one print statement which could enable an API driven LLM the ability to interact with it directly. There are also options you can enable and disable to assist the AI.

sdick commented 2 days ago

Hello, I'm a professor of Computer Engineering at the University of Alberta. I'm interested in using your ASCII_LLM_MAZE as the problem-to-solve for a prompt engineering lab in my Intelligent Systems Engineering course. Could I ask that, if you're going to combine all of the outputs at once, you keep the current approach as a branch? I think I can use this as-is quite nicely for a lab on tree-structured prompts using LangChain.

rfwarn commented 1 day ago

Thanks for reaching out with interest in this project. Yes, I can create a separate branch for it if that would be useful to you. Just to clarify, I have multiple print statements that produce the output for each move, and the intention was to consolidate those into one output/print return for each move.

Best regards, Ryan Warn

On Thu, Jul 4, 2024 at 2:23 PM sdick @.***> wrote:

Hello, I'm a professor of Computer Engineering at the University of Alberta. I'm interested in using your ASCII_LLM_MAZE as the problem-to-solve for a prompt engineering lab in my Intelligent Systems Engineering course. Could I ask that, if you're going to combine all of the outputs at once, you keep the current approach as a branch? I think I can use this as-is quite nicely for a lab on tree-structured prompts using LangChain.

— Reply to this email directly, view it on GitHub https://github.com/rfwarn/ASCII_LLM_Maze/issues/2#issuecomment-2209575023, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFPGAVRXWAOJ4EQM4W5EVSTZKW4O3AVCNFSM6AAAAABKMED5DOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMBZGU3TKMBSGM . You are receiving this because you commented.Message ID: @.***>

sdick commented 1 day ago

Ah, I see. So it would still be a sequence of prints, and then waiting for a response. That does make more sense.

What I'm working on right now is to find a way to programmatically receive those text outputs into another Python script, and generate text responses to the ASCIImaze process from that second script. Initially it would just be another layer for a human, but that would also easily let me pass everything to an LLM as a prompt. If I can figure this out, I'll push an example script to you.

Best regards,

Scott Dick

rfwarn commented 1 day ago

Yes, it prints sections of the output in a few pieces until it reaches the input prompt again for each move. Here is an example of the different print functions used when making a valid move:

[image: image.png] each row of the maze is generated separately [image: image.png]

The issue that was noted was for an improvement to consolidate these separated print functions into a single variable for a single output for each move. This variable can be passed to a calling function in a return statement (if running it externally) for each turn which might be what you are looking for. Once this improvement has been implemented, in another Python file, you could import ASCIImaze and have this returned value be formatted and passed to an LLM API or however you wish to interface with it with or without user input. Let me know if this aligns with what you are trying to achieve.

Also to note, it only takes one letter/number for the input. If the response is longer or not one of the approved characters, it will give a response that an incorrect character was entered. That would need to be handled in your new python script. Something that you can easily find using regex or creating a custom tool if you are using Claude or a CustomGPT should work well.

Best regards, Ryan Warn

On Fri, Jul 5, 2024 at 2:06 PM sdick @.***> wrote:

Ah, I see. So it would still be a sequence of prints, and then waiting for a response. That does make more sense.

What I'm working on right now is to find a way to programmatically receive those text outputs into another Python script, and generate text responses to the ASCIImaze process from that second script. Initially it would just be another layer for a human, but that would also easily let me pass everything to an LLM as a prompt. If I can figure this out, I'll push an example script to you.

Best regards,

Scott Dick

— Reply to this email directly, view it on GitHub https://github.com/rfwarn/ASCII_LLM_Maze/issues/2#issuecomment-2211412813, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFPGAVSUQHIZI2JNRJASF3DZK4DELAVCNFSM6AAAAABKMED5DOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMJRGQYTEOBRGM . You are receiving this because you commented.Message ID: @.***>