Genie Community Forum

Device that lets user choose if an article is relevant or not

Actually, i get the offer to run the action here:

The question itself is weird but you can fix it by editing dataset.tt

I think if you don’t see it might be a caching issue, which you can workaround by restarting your engine from https://dev.almond.stanford.edu/me/status

(There are also a couple issues with the UI around yes/no buttons that I fixed recently but the fix hasn’t been deployed, and you should set your action to be #[confirm=false] otherwise you’ll get one extra confirmation step)

Yeah right now it looks like this:


So the repeat confirmation can be fixed by adding #[confirm=false] in the action in manifest.tt? Where should I look to fix the wording on the questions, is it only in dataset.tt?

Yes to the confirm question.
To fix the question that suggests the action, change the wording of the action in dataset.tt
To fix the subsequent question about whether the article is relevant, add a #_[prompt] annotation to the relevant parameter in the manifest.tt

The confirm fix appears to not work? I tried adding it as follows:

action mark_training_news_article(in req id: Entity(org.itspersonal.newsfilter:training_news_article),
                                    in req relevant: Boolean #_[prompt="Is this article relevant to the topic?"])

#[confirm=false]
  
#[doc="label a news article and add it to the training dataset of a certain topic"];

But the Almond still asks for confirmation twice:

I don’t see the additional confirmation now:

Caching issue again?

Yeah it seems so, I got the same output format as yours after resetting the Almond. Do you know how I can get the initial question to say “would you like to label the article as relevant to the topic” instead of label it article?

You can get to “would you like to label it as relevant to the topic” if you write down "label $p_id as relevant to the topic" in the dataset.tt

Can I make it so that the response is different depending on the relevant value? For example the output is currently:


I want to make it so that if the relevant is false/no then the sentence is “I labeled id as irrelevant to the topic”

You might be able to do what you want with a result phrase, something like:

#_[result=["${relevant:select:true{phrase if relevant} false{phrase if not relevant}}"]]

You must include at least one output parameter in the action to enable the result phrase. Also this is a very recently added, experimental feature, so it might not work.

I ended up changing the wording to just labelled since that seems to work just fine. Do you have an estimate on when the NLP training will work again for new devices?

I do not know yet, I’m afraid.
I recommend you train your own model, following the instructions at genie-toolkit/starter/custom at master · stanford-oval/genie-toolkit · GitHub
Then you can deploy that custom model with almond-cloud or with genie server.

Hi Giovanni,

We’ve successfully connected the independent deployment of almond with my developer key and the device is now showing in the my almond section. However, for some reason the device works normally in the dev.almond website but its training data label part is not working in the deployment. It runs as follows:

As you can see, for some reason it responds with “Sorry, there seems to be a problem with the Almond service at the moment. Please Try again later.”, but the device/service is running as normal on the dev.almond website:

What could cause this and how can we fix this?

What’s the value of NL_SERVER_URL in the config?
It should be https://nlp-staging.almond.stanfod.edu

It was https://almond-nl.stanford.edu, we’re gonna try changing it to https://nlp-staging.almond.stanford.edu.
It fixed the problem and it works now. Thanks