IBM Watson™ Ideas

Welcome to the IBM Watson™ Ideas Portal


We welcome and appreciate your feedback on IBM Watson™ Products to help make them even better than they are today!


If you are looking for troubleshooting help or wondering how to use our products and services, please check the IBM Watson™ documentation. Please do not use the Ideas Portal for reporting bugs - we ask that you report bugs or issues with the product by contacting IBM support.


Before you submit an idea, please perform a search first as a similar idea may have already been reported in the portal.


If a related idea is not yet listed, please create a new idea and include with it a description which includes expected behavior as well as why having this feature would improve the service and how it would address your use case.

Highlights should include JSON object for Entity and relations

During Projcet Daisey development, we are experiencing very long overall query times and one of the issues is the amount of processing we have to perform on the results to be able to display evidence to the user.

 

When a user searches in WDS for an Entity or Relation, the highlight returns  a highlights section like this :

 

 "highlight": {
"enriched_text.entities.type.raw": [
"<em>CASH</em>"
],
"enriched_text.relations.type.raw": [
"<em>Inventory_for</em>"
]
}

 

This cannot be displayed to a user as a search result, so the application is required to search through the entire enrichment section of the results to find which enrichment was the one that matched.

This can take quite a bit of time if there are a lot of enrichments, as the enriched text also includes every Entity and Relation

 

If the JSON object for the Entity or Relation was included in the Highlights section it would significantly improve overall query time

 

 

 

  • Guest
  • Oct 24 2019
  • Future Consideration
Why is it useful?
Who would benefit from this IDEA? Project Daisey in UK but also all other clients using WDS Query language for searches
How should it work?
Idea Priority
Priority Justification
Customer Name
Submitting Organization
Submitter Tags
  • Attach files
  • SARA ELO DEAN commented
    24 Oct 17:49

    This is critical for clients who develop their own custom model to annotate domain knowledge and then retrieve documents for domain insights.  The current highlight returns only entity and relation type but to show the EVIDENCE of why a particular document matched, i.e. show the actual relation.sentence or entity.text requires returning all enrichments and searching for the exact enrichment that matched. This is  a huge gap for Project Daisey where we need to cache enrichments in an external store for faster retrieval.

  • Admin
    Phil Anderson commented
    24 Oct 23:02

    Can you provide an example of the query that is returning this? It seems like it would mainly be an issue if a bunch of different queries were ORed, or a substring search was performed (otherwise you'd know which enrichment matched as you searched for it)

  • SARA ELO DEAN commented
    25 Oct 19:03

    My query could be for a specific relation - entity combo from my custom model:

    (enriched_text.relations:(type::"Related_Costs",arguments.entities.type:"FIXED_ASSETS"))

     

    My query currently returns these highlights,

        "highlight": {
                    "enriched_text.relations.arguments.entities.type": [
                        "<em>FIXED_ASSETS</em>"
                    ],
                    "enriched_text.relations.type.raw": [
                        "<em>Related_Costs</em>"
                    ],
                    "enriched_text.entities.type": [
                        "<em>FIXED_ASSETS</em>"
                    ]
                }

     

    (which actually is wrong because i did not ask to match on enriched_text.entities.type::"FIXED_ASSETS" but only

    enriched_text.relations.arguments.entities.type::"FIXED_ASSETS")

     

    However,  I should be getting back the evidence where it matched, I should get back something like this which would be somewhat the equivalent of getting back the sentence for a keyword match with the term highlighted.:

     

           "highlight": {

     "enriched_text.relations.type.raw": [
                 {
                            "type": "Related_Costs",
                            "sentence": "The recoverable Extra Expense loss is the reasonable and necessary extra costs incurred by the Insured for the following during the PERIOD OF LIABILITY: (1) Extra expenses to temporarily continue as nearly normal as practicable the conduct of the Insured's business; and (2) Extra costs of temporarily using property or facilities of the Insured or others; less any value remaining at the end of the PERIOD OF LIABILITY of property obtained in connection with sub -paragraph (1) or (2) above.",
                            "score": 0.5205,
                            "arguments": [
                                {
                                    "text": "property",
                                    "location": [
                                        34941,
                                        34949
                                    ],
                                    "entities": [
                                        {
                                            "type": "FIXED_ASSETS",
                                            "text": "property",
                                            "disambiguation": {
                                                "subtype": [
                                                    "NONE"
                                                ]
                                            }
                                        }
                                    ]
                                },
                                {
                                    "text": "costs",
                                    "location": [
                                        34914,
                                        34919
                                    ],
                                    "entities": [
                                        {
                                            "type": "COSTS",
                                            "text": "costs",
                                            "disambiguation": {
                                                "subtype": [
                                                    "NONE"
                                                ]
                                            }
                                        }
                                    ]
                                }
                            ]
                        }

     }

        ]

     

    Or at least I should get back relation.sentence for a relation match:

     

    "highlight": {

     "enriched_text.relations.type.raw": [
                 {
                            "type": "Related_Costs",
                            "sentence": "The recoverable Extra Expense loss is the reasonable and necessary extra costs incurred by the Insured for the following during the PERIOD OF LIABILITY: (1) Extra expenses to temporarily continue as nearly normal as practicable the conduct of the Insured's business; and (2) Extra costs of temporarily using property or facilities of the Insured or others; less any value remaining at the end of the PERIOD OF LIABILITY of property obtained in connection with sub -paragraph (1) or (2) above.",

     

     

    and for an entity match I would expect

    {
                            "count": 1,
                            "text": "Equipment",
                            "confidence": 0.768784,
                            "mentions": [
                                {
                                    "sentence_location": [
                                        0,
                                        299
                                    ],
                                    "location": [
                                        130,
                                        139
                                    ],
                                    "text": "Equipment",
                                    "mention_type": "none",
                                    "confidence": 0.768784
                                }
                            ],
                            "type": "FIXED_ASSETS",
                            "disambiguation": {
                                "subtype": [
                                    "NONE"
                                ]
                            }

     

    or at least matching entity text

     

    {
                            "count": 1,
                            "text": "Equipment",
                            "confidence": 0.768784,
                            "type": "FIXED_ASSETS",
                            "disambiguation": {
                                "subtype": [
                                    "NONE"
                                ]
                            }

     

    Let me know if this example makes sense Phil.