llm-pddl
                                
                                
                                
                                    llm-pddl copied to clipboard
                            
                            
                            
                        Cleaning LLM-generated pddl problem files
Thanks for the nice work!
I am wondering when you use LLM to generate pddl problem files, how do you handle the cleaning, i.e. removing the extra text other than pddl file. I have tried several LLM models and the pddl problem files would contain other text.
Thank you for your interest! I have found that adding this line to the prompt was enough for GPT-4: "Only return the PDDL file. Do not return anything else."
If you continue to get extra text, maybe you can try to parse the output and look for the start and end of PDDL code. For instance (define (problem ...) (:goal ...))