Symbolic reasoning, natural language pddl, knowledge bases

Searching the forum about symbolic reasoning did not yield results, so i’m starting the topic. I am working on a project to use GPT-3 as an interface to transmit information between natural language and symbolic representation, coupled with a strips extension and a knowledge data base to build a “sentient” building (actually it’s a non profit street art place with the mission to make the world a better place).

One of the specific challenges: If i have 2 planning agents A and B that communicate in the same pddl, Agent A can teach Agent B some actions and even plans. So if one is able to map human language to pddl and vice versa ( via GPT-3 ) this should work for Human A and Agent B. So the Agent can tell the human what it’s capable of given some conditions (“I can let you in, if you stand between 9 - 21 at the entrance”) and vice versa (“I pick up the parcel, if you tell me where it is stored”).

I would be thankful for some recommendations in transforming natural language into PDDL and symbolic representations like predicate logic or fuzzy logic to integrate them into a knowledge base or a planner.

4 Likes

You’re basically trying to map a list of tasks to possible verbal commands. This is similar to Amazon Alexa. I also found this article that may be relevant. https://arxiv.org/pdf/2008.10073.pdf

2 Likes

Thanks, a lot. The paper seems very interesting. Actually i am pursuing an approach that is a bit different. To identify what a human may wan’t my plan is to spawn a planner for the human (like in adversarial search, but not adversarial) to deduce possible task from goals that require the current state, or part of the current state as a precondition in the plan. E.g. If there is a person with a box in front of the entrance (were doing some image processing and tracking) the goal to deliver the box would be reachable, if the person has no box it probably wan’ts to see the exhibition. The planner considers actions of the building. As booth goals would require the building to open the door, which is an action of the building. Another action would be to ask the person what’s business.

You mean something like this?
image

1 Like

Happy to hear i am not the only one regarding this application of GPT-3 interesting.
A) I did not try prompts by now because i am currently in the process of designing the logic language and implementing the inference engine. By “sentient” i wanted to express that the building will be/is capable to assess it’s own state and that of humans in certain areas of the building using image processing and tracking.
B) PDDL is, as far as i am concerned a subtopic of computational logic. To get into the basics of the topic, i would recommend the book “artificial intelligence a modern approach” by Norvig and Russel chapters “Planning”, and “Planning and acting in the real world”. Also the “Standford Research Institute Problem Solver” (STRIPS) is a good starting point.

2 Likes

Yes, except for the level of detail of the description of the scenario. Assuming that this is GPT3: In my case the description of the scenario would be generated from the perceptions and actions of the building, in the logic domain definition language(LDDL) i am currently implementing. i would not need GPT-3 to convert LDDL to natural language. I would also need to convert the INTENT to LDDL, which would result in adding a relation between the person and the (yet unknown) concept of “museum volunteer” as well as adding the goal to the person to enter the building.
So my idea, mapped to this example, is to use GPT-3 to translate or summarize the SCENARIO from the LDDL use GPT-3 to get the INTENT and the use GPT-3 to translate the INTENT back to the LDDL.
This mapping (if working) would allow for the buildings agent to deal with concepts and situations for which it can not derive an action by falling back on GPT-3. (like asking what being a museum volunteer implies on the attitude of the person towards the museum) Furthermore i would like to try if GPT-3 can asses the development of the situation and decide if there is the need for human intervention because my agent has reached it’s limits.

GPT-3 is very good at generating procedures

Thanks for the hint. I found some indications this might be the case and, given the amount of coding tutorials and commented code available for the training of GPT-3, this does make sense. I will give it definitely a try, but i guess it will be a few weeks before i got my inference engine and language ready.

Here is a prompt I created from the ideas mentioned in one of the papers above. The idea of abstracting and listing the steps to complete a task. GPT-3 is great at this.

Prompt:

List the steps required to complete the task.
Task: Clean and slice an apple for an appetizer.
Steps:

  1. Find an apple
  2. Wash the apple in the sink
  3. Put the clean apple on the cutting board
  4. Find a knife
  5. Use the knife to slice the apple
  6. Put the slices in a bowl
  7. Put bowl on table
    ###

Task: Make a vegetable garden.
Steps:

  1. Find a place for the garden
  2. Dig a hole
  3. Plant seeds in the hole
  4. Water the seeds
  5. Put dirt on top of the seeds
  6. Water again
  7. Watch the seeds grow
    ###

Task:

3 Likes

So the interesting problem you are trying to solve, is constraining or mapping GPT-3 to a list of subtasks that your system knows how to execute. We have similar task oriented requirements of the assistant that we are deploying on our Health platform. (Helping the user navigate to the resource they are looking for, or automating tasks they request)

2 Likes

Semi related?

3 Likes

That’s a gap between the planner and natural language i intend to bridge with GPT-3. Breaking down complex context given in natural language in smaller pieces that can be converted into a logic language. This could even be done in recursion for the sub task, since my planner works with the desired state of the world or the desired action of an agent this will eventually lead to an entry point for planning.

1 Like

In a way. The user is part of the system so the ability to execute a task depends on the abilities of the human interacting with the building. The real challenge in my case is to integrate new actions/properties or remove actions/properties from a particular thing or concept in the running system - while keeping the system flexible - to deal with situations unknown to the system.
A planning algorithm is quite nice for this because it can be easily queried about where a plan fails, an information that can be used to search for a solution with the interacting humans. Also a human can explain to the planning ai why a task cannot be done.

1 Like