Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP implement IBIS1 starter #1

Merged
merged 42 commits into from
Sep 11, 2024
Merged

WIP implement IBIS1 starter #1

merged 42 commits into from
Sep 11, 2024

Conversation

vladmaraev
Copy link
Collaborator

@vladmaraev vladmaraev commented Aug 16, 2024

Open questions:

  • now domain includes both relations for ShortAnswer (A) and Propositions (P). It would be better to have only one? Some rules in IBiS use A, and some P...
  • plans are not implemented yet. Can we live without them?

@vladmaraev vladmaraev force-pushed the ibis1 branch 2 times, most recently from 3203265 to 75a4eeb Compare August 17, 2024 15:52
Also, remove sender -- it is not needed, provided to DME on
invocation (parentRef).
src/rules.ts Outdated
return "resolves" === x.type;
}

const plans = {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better move it to the parent machine's context (isu.ts or tests), which is provided to DME as input.

integrate_usr_request: ({ is }) => {
if (
is.shared.lu!.speaker === "usr" &&
is.shared.lu!.move.type === "request"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be added to types.ts (interface Move definition). Perhaps, we should also make distinction between moves and actions.

src/nlug.ts Outdated
[
{
"type": "ask",
"content": {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So far I express questions like functions:

   const q = (x) => `meeting person ${x}`

This would make resolving QUDs pretty straightforward: q("Vlad") evaluates to meeting_person Vlad. But maybe there is a better way with js objects.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, representing questions as functions is attractive. But representing propositions as strings ("meeting_person vlad") might become problematic, when such strings will need to be parsed, e.g. to identify the argument. How about something like:

const q = (x) => {"type": "proposition", "content": {"predicate": "meeting_person", "argument": x}}

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! (it should be either with parenthesis -- const q => ({ ... }) or return -- const q => {return { ... }}, or some people recommend against this syntax -- function q(x) => {return { ... }}).

@vladmaraev vladmaraev force-pushed the ibis1 branch 2 times, most recently from 42d5b51 to 10a6e38 Compare August 22, 2024 08:20
Additionally, update @statelyai/inspect and make typescript checks for
pull requests.
alex-berman and others added 23 commits September 6, 2024 15:48
Also move plans to domain.
After the change, instead of returning an object containing preconditions (boolean) and potentially result of applying rule (information state), rules now return a function that returns the new information state (if preconditions hold), or undefined if preconditions do not hold.

Also, logging of rule applications is now generalized.
...instead of as function. Representing at as a Javascript function was appealing in the sense that it generalized to any predicate arity, but created problems with equality checks.
Before this change, ASR_NOINPUT caused a user input to be simulated. This was used for testing.
This solves the test failure at the end of "system answer from database".
Also make is.database.consultDB implementation more specific.
@vladmaraev vladmaraev merged commit 4c3be64 into main Sep 11, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants