Answers results with relations

Hi,

we have a series of products related to each other (not all to each other).

For example, product A is related to products E, M and L and we want that when the user searches for product A not only this result is displayed but also products E, M and L too.

How could we do it?

Thanks.

Regards,

David

Hi @David_Fernandez,

You can relate entities to each other by using the relationship custom field type. The Linking Entities Together unit goes more in-depth on the relationship types available and how to set it up in the Knowledge Graph.

For these relationships to be searchable within an Answers experience, you will need to go to the backend configuration and add the custom relationship field (that you created) as a searchable field within the products vertical.

Let me know if this helps!

1 Like

Thank you very much for your answer.

We had done a test related to the entities through a custom attribute and including that within the configuration of sectors in Answers. But we observe that if we search by the name of “A” we are also trying to search for that name in the custom field and the rest of the products are not really called by that name.

For example, I have 3 entities “Coke”, “Pepsi” and “Fanta” and I relate them to each other. The idea is that if I search Answers for “Coke” I have 3 results: “Coke” and the other 2 because they are related.

Thanks!

Hi David,

I ran this soda example in a test account using the “Entity Relationship (Shared Field)” custom field type and was able to get the outcome you are describing. Here are the steps I went through that you should be able to duplicate:

  1. Create the custom field in Knowledge Graph > Configuration > Fields > Add Field. Using a shared field would probably work best for this example where you want to see all three of these sodas as a result regardless of which soda name you are using as a query

  2. Go to the entity you want to add the related products to. Go to the new custom field you just made, click into the field and select the related items in the dropdown. Here, I added Coke and Fanta as related products to the Pepsi Entity.

  3. Go to your Answers backend, select the Product vertical and add c_relatedProduct.name as a searchable field. Now if you search Pepsi, it will pop up with results showing the related Coke and Fanta entities as well. You can see this on the right in the test search.

If this isn’t what you are looking to achieve or are still having issues, feel free to add specific details/screenshots and I can assist.

Hi Micaela

I hope you are well.

I’m david’s teammate. we follow the steps but we can’t make it work:

Are we doing something wrong?

regards,

@Sergio_Hernandez -

I took a look at the account and switched the c_relatedProduct.name searchable fields to NLP Filter (instead of Text Search) which gives you the result you are looking for. This makes it so the algorithm is pulling the exact name of the entity you are searching for. Based on the naming of your entities, Text Search was likely pulling in unrelated entities that were hiding those related products you were wanting to surface.

Hi Micaela,

thank you for your response. But it isn´t work 100% fine. We need the result “1NKEMIA” too.

image

That is, in this example case, we need both the exact product and its 2 related products, 3 results.

Regards,

David

Hi David,

In the account, I am seeing this result when I search “1NKEMIA”. All 3 of those products are surfacing with these searchable field settings. If you notice that the actual product you are searching for isn’t appearing in the result, I suggest updating the Name searchable field.

Hi Micaela.

How are you?. I hope you are well.

We followed your steps and we can’t get it to work.

We have an entity (Fondos ÂżcĂłmo identificar lo mejores?) with forty related entities. in the vertical products we have the following configuration for the fields c_relatedProduct.name and Name

if we put in the search bar “Fondos ¿cómo identificar lo mejores?” (This search term coincides exactly with an entity), the search result is the forty related entities but the entity “Fondos ¿cómo identificar lo mejores?” which should appearand does not appear:

Iif we modify the configuration of the Name field including the Filtro PNL and we do the same searh, the result is only the entity Fondos ÂżcĂłmo identificar lo mejores? and the forty related entities do not appear:

Can you help us?

Thanks

regards,

Hi Sergio -

Based on these results, it looks like there is a conflict with using NLP Filter for name and related product fields where the algorithm is prioritizing one or the other. I will escalate this to the product team to see why this may be happening.

Otherwise, there is a workaround for this where you can relate an entity to itself. So in this case you could add Fondos ÂżcĂłmo identificar lo mejores? to the related product field for the same Fondos ÂżcĂłmo identificar lo mejores? entity. This will allow you to achieve the result of having the product itself and all related products.

Hi Micaela.

Thanks for your answer. We will be waiting for the solution.

In relation to this, when a search matches two rules, the results that are shown are only those of the first part of the rule (Boost Entities - Entities) and the second part that contains the filters is not shown when we think it should be the entities contained in the two filters as well. For this reason, the experience of results is limited.

Is there any solution for this?

thanks

regards,

Hi Sergio,

Let me just confirm I’m understanding the issue you are seeing: for these two query rules, you have two actions, one to boost, and a second to apply a saved filter - and the filter does not seem to be applying?

Are you confident that the filter IDs indicated in that log - “205501” and “163403” - are correct and exist in the Knowledge Graph? They do not seem to match the filter IDs in the query rules you showed in the image, so wanted to confirm.

One unrelated recommendation I might suggest: I noticed you have a few Query Rules here that could be potentially done more simply with other features of the configuration.

  • The query rules to boost specific verticals for all searches could instead be done by setting a positive Vertical Bias on the vertical you want to boost - you can read more about vertical ranking here
  • The query rule to apply a saved filter on all searches could instead be done by defining the saved filter ID directly in the vertical! You can read more here - see the parameter “savedSearchId” under each vertical.

Regards,
Alex