Skip to content

Merge Rest api with knowledge gaps into master#532

Merged
JackJackie merged 55 commits intomasterfrom
rest_api_with_knowledge_gaps
Nov 20, 2024
Merged

Merge Rest api with knowledge gaps into master#532
JackJackie merged 55 commits intomasterfrom
rest_api_with_knowledge_gaps

Conversation

@JackJackie
Copy link
Contributor

No description provided.

@JackJackie JackJackie linked an issue Aug 29, 2024 that may be closed by this pull request
2 tasks
@JackJackie JackJackie requested a review from bnouwt August 29, 2024 09:09
Copy link
Collaborator

@bnouwt bnouwt left a comment

Choose a reason for hiding this comment

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

Hey @JackJackie, I finished the first review. What do you think?

@JackJackie
Copy link
Contributor Author

I'll continue with the REST API changes and will produce a new pull request after that

@bnouwt
Copy link
Collaborator

bnouwt commented Sep 3, 2024

I think you can just keep working in this pull request.

@JackJackie
Copy link
Contributor Author

Hi @bnouwt : I updated the smart-connector-rest-server /ask route to transfer the knowledge gaps that were found as a result of the request. See the ProactiveApiServiceImpl at line

I kept the old /ask route for convenience and checking...it can be deleted once we are happy with the new /ask route.

It works well on my machine (well-known statement of every developer!). Can you check whether it works for you as well?

Thx, Jack

bnouwt
bnouwt previously requested changes Sep 17, 2024
Copy link
Collaborator

@bnouwt bnouwt left a comment

Choose a reason for hiding this comment

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

Hey @JackJackie, looks good 👍

If we make sure that the TriplePatterns are represented correctly and we have a unit test (either via the Java API (easy) or via the REST API (difficult)) and all the tests are still succeeding, we are ready to go!

@JackJackie
Copy link
Contributor Author

Hi @bnouwt,

Before diving into building the optional flag, I ran the unit tests of the smart connector.

There were 60 runs without failures and errors. 3 unit tests were skipped, but I saw that they were @disabled, so this makes sense.

@bnouwt
Copy link
Collaborator

bnouwt commented Nov 5, 2024

I've merged the master branch into this branch and resolved the conflicts. This was not trivial, because the master also contained changes to the *KnowledgeInteraction classes. I am currently running a maven build and hopefully this succeeds and we can let GitHub check if this branch is ready to be merged.

@bnouwt
Copy link
Collaborator

bnouwt commented Nov 5, 2024

Unfortunately, the build did not yet succeed. The DistributedMessageDispatcherTest#testRemoteMessageExchange test somehow fails, but it might be a fluke. For now I've committed the changes and hopefully they build on github.

@bnouwt
Copy link
Collaborator

bnouwt commented Nov 7, 2024

Hi @JackJackie, as mentioned above the build failed due to the REST API Knowledge Gap Unit Tests failing and I found that this is caused by the fact that the default MatchStrategy is not sufficient to find Knowledge Gaps. Unfortunately, it is not possible yet to change the default MatchStrategy from the REST API.

I see a few options to fix this:

  • replace the smart connector REST API reasonerEnabled configuration with a matchStrategy configuration.
  • use conditional configuration like if knowledgeGapsEnabled, then MatchStrategy.SUPREME to automatically upgrade the MatchStrategy if Knowledge Gaps are requested.
  • add a REST API Knowledge Interaction configuration for matchStrategy.

The conditional configuration could make configuring the Knowledge Engine very complex, so I am not sure I would go for that one.

This reason why this problem did not pop-up before is because I merged the master branch into this branch including the new graph pattern matching algorithm with configuring match strategies at the Knowledge Interaction level.

@JackJackie
Copy link
Contributor Author

@bnouwt : I discovered a small bug in the ProactiveApiServiceImpl around the knowledgeGaps being null.....I need to fix that before we can continue

@JackJackie
Copy link
Contributor Author

JackJackie commented Nov 16, 2024

@bnouwt : below here it says...."Changes requested...1 change requested"...I tried to look which change request that is, but couldn't find out. Do you know?

@JackJackie JackJackie dismissed bnouwt’s stale review November 18, 2024 13:58

Don't ask stupid questions

@JackJackie
Copy link
Contributor Author

@bnouwt , @Sophietje , I'm merging the RESTapi with knowledge gaps enabled branch into main....so you can continue with other features based on this new version....hopefully nothing (much) breaks :-)

@JackJackie JackJackie merged commit ad82cdf into master Nov 20, 2024
@bnouwt bnouwt deleted the rest_api_with_knowledge_gaps branch November 21, 2024 08:50
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.

Add operation to REST API that returns Knowledge Gaps for an Ask KI

2 participants