Java: Automodel Framework Mode Extraction Queries#12830
Conversation
4388659 to
0849bc8
Compare
57e5c39 to
daddfb7
Compare
There was a problem hiding this comment.
CodeQL found more than 10 potential problems in the proposed changes. Check the Files changed tab for more details.
2307b1b to
8da200b
Compare
|
https://github.com/github/codeql-dca-main/issues/12666 DCA experiment containing some data to use |
a1f7ed3 to
df434d6
Compare
|
https://github.com/github/codeql-dca-main/issues/12694 <- DCA experiment that will hopefully also contain positive training data once finished :-) |
eaec7ea to
001e2d8
Compare
511c4f7 to
afaa8c5
Compare
…od candidates; remove UndocumentedMethodCharacteristics, now that we use ModelApi
afaa8c5 to
adcf4a3
Compare
|
Jean, I've renamed the query files |
|
I ran a DCA experiment, and the metadata is passed correctly! See backref. @atorralba, I think this is now ready to merge.. could I get an approve? 👍 |
|
Do you mind if I merge my outstanding QLDoc suggestions first? |
|
Which ones do you mean, @atorralba? Have I missed any? Sure, go ahead 👍 |
|
@atorralba sorry to be a bother, but ql-for-ql complained; tests were green otherwise. Could you re-approve? |
For extraction of automodel candidates from method declarations in "framework mode".
This PR contributes three new queries that extract a) candidates, b) positive prompt samples, c) negative prompt samples.
What's new here is: in framework mode, the 'endpoints' we consider are no longer the arguments passed to method calls. Instead, the endpoints we consider are parameter declarations in methods.
Notes:
AutomodelSharedCharacteristicsmodule is language agnostic (it might be moved to a different location later on).AutomodelSharedCharacteristics::CandidateSig, you can derive a bunch of characteristics 'for free'. Enough, I expect, to have useful behaviour straight out of the gate. TheAutomodelSharedCharacteristics::CandidateSiginterface is very generic — it should be possible to implement this for a very wide range of use cases. If you can think of important use cases where we'd not be able to implementAutomodelSharedCharacteristics::CandidateSig, that'd be useful feedback.AutomodelSharedCharacteristics::SharedCharacteristics. Examples of how to do this are all characteristics inAutomodelEndpointCharacteristics.qll.java/ql/src/Telemetry/AutomodelEndpointCharacteristics.qllare private imports — this means that the queries will be as language agnostic as possible and we should be able to very quickly port the query files to other modes or even languages later on :) There's other ways to achieve easy portability, but for the time being I chose to go with the simple route.