konveyor-ecosystem / kai

Konveyor AI - static code analysis driven migration to new targets via Generative AI
Apache License 2.0
8 stars 10 forks source link

Adjust rule text to improve mistral results #166

Closed jmontleon closed 2 months ago

jmontleon commented 2 months ago

I don't know if we want to be manually changing this file, but with this change I was able to get mixtral-8x7b-instruct-v0-1 to add the import to OrderService.java.

If this is an acceptable approach for now, I believe there are other places in the output.yaml we could probably update this text.

The text is probably not quite right for a permanent solution because the text mentions scopes generically with @ApplicationScoped as an example, but to that point I believe we have another issue where ever replacement using @ApplicationScoped rather than session, request, so I'm not sure it matters much at this point.

fabianvf commented 2 months ago

@jmontleon we should probably check in the updated cached request that you saw better performance with too

jwmatthews commented 2 months ago

This can help us to override the Kantra default rules and allow us to have a copy in this repo so we can tweak: https://github.com/konveyor-ecosystem/kai/pull/167/files

jwmatthews commented 2 months ago

@jmontleon we have the output you found that helps now in: https://github.com/konveyor-ecosystem/kai/blob/main/example/analysis/coolstore/output.yaml#L2628-L2637

We can tweak this message for subsequent analysis runs by editing the rule file: https://github.com/konveyor-ecosystem/kai/blob/main/example/default_rules/quarkus/201-cdi-to-quarkus.windup.yaml#L99

and then re-running: https://github.com/konveyor-ecosystem/kai/blob/main/example/analyze.sh

jmontleon commented 2 months ago

Thank you @jwmatthews !