AI content: Difference between revisions

From Nasqueron Agora
Line 44: Line 44:


<syntaxhighlight lang="mysql">
<syntaxhighlight lang="mysql">
SELECT CONCAT("D", rev.id) as revision, title, rev.dateCreated, userName, repositorySlug as repository
SELECT
    CONCAT("{{D|", rev.id, "}}") as revision,
    title,
    DATE_FORMAT(FROM_UNIXTIME(rev.dateCreated), '%Y-%m-%d') as `date`,
    userName,
    CONCAT("{{Repo|", repositorySlug, "}}") as repository
FROM devcentral_differential.differential_revision rev
FROM devcentral_differential.differential_revision rev
     LEFT JOIN devcentral_repository.repository repo ON repo.phid = rev.repositoryPHID
     LEFT JOIN devcentral_repository.repository repo ON repo.phid = rev.repositoryPHID
     LEFT JOIN devcentral_user.user ON user.phid = authorPHID
     LEFT JOIN devcentral_user.user ON user.phid = authorPHID
WHERE  
WHERE rev.phid IN (SELECT DISTINCT objectPHID FROM devcentral_token.token_given WHERE tokenPHID = "PHID-TOKN-emoji-3");
    rev.phid IN (SELECT DISTINCT objectPHID FROM devcentral_token.token_given WHERE tokenPHID = "PHID-TOKN-emoji-3");
</syntaxhighlight>
</syntaxhighlight>


Line 55: Line 59:


{| class="wikitable sortable"
{| class="wikitable sortable"
! revision || title || date || userName || repository
! Revision || Commit title || Date || Author || Repository
|-
|-
| {{D|2532}} || Draft XSD schema for Report library || 2022-02-16 || dereckson || {{Repo|schemas}}
| {{D|2532}} || Draft XSD schema for Report library || 2022-02-16 || dereckson || {{Repo|schemas}}

Revision as of 15:30, 20 May 2023

AI uses

Nasqueron dwellers use the tools they want under their own responsibility.

Language models are welcome to inspire/proofread/review/generate/code what you want.

Automatic generation without human supervision or with blind trust can be frowned upon, see for example on Stack Overflow.

For privacy policy reasons, we don't query APIs like OpenAI directly in services hosted by Nasqueron, for example we don't plan to use ChatGPT in Sentry to offer solutions to reported issues.

AI content transparency

Tag any development activity where ChatGPT or another IA model has been useful. Try to include what part, so we can prepare a report of the areas where it's the most interesting to use it.

Credit on images the tool used to generate them Dall-E, Adobe Firefly, Stable Diffusion, etc. The prompt used is welcome too.

Development with AI

Here a summary of our experience with models, mainly ChatGPT.

Analysis

  • ChatGPT can produce a draft for a entity/associations diagrams, so you've a format to work with (ServPulse)
  • ChatGPT can't really be helpful to suggest product names (temperature too low?), but is helpful to justify the choices, state the values. An example at Operations grimoire/Alkane#Why_the_name_Alkane?

Code review

  • Not really useful: compliment the clarity, respect of the forms and the best practices, but don't give actionable hints
  • Could be cool for morale if not technically to have positive feedback

Development

ChatGPT understands the prompts but to generate code, that's clearly not relevant.

  • For a parser function, it's easier to write it in code than specify the requirements (and it will try to reguest the parsing)
  • Can't write correctly C (null-terminated strings, segfaults) or Rust (borrowing, suggest methods not for the object you work with)
  • Can't write pure sh scripts without errors

Reports

Commits with ChatGPT assistance

We award a token "Yo se serious" (reverse smiley) to revisions where ChatGPT was useful.

It allows to query the Phabricator database to gets the list:

SELECT
    CONCAT("{{D|", rev.id, "}}") as revision,
    title,
    DATE_FORMAT(FROM_UNIXTIME(rev.dateCreated), '%Y-%m-%d') as `date`,
    userName,
    CONCAT("{{Repo|", repositorySlug, "}}") as repository
FROM devcentral_differential.differential_revision rev
    LEFT JOIN devcentral_repository.repository repo ON repo.phid = rev.repositoryPHID
    LEFT JOIN devcentral_user.user ON user.phid = authorPHID
WHERE rev.phid IN (SELECT DISTINCT objectPHID FROM devcentral_token.token_given WHERE tokenPHID = "PHID-TOKN-emoji-3");

As of 2023-05-20 that gives:

Revision Commit title Date Author Repository
D2532 Draft XSD schema for Report library 2022-02-16 dereckson schemas
D2994 Add RequestBody guard for Rocket 2023-04-11 dereckson limiting-factor
D3016 Create initialized sites subdirectory 2023-04-14 dereckson alkane
D3039 Simplify map autolinker call 2023-04-17 dereckson servers-homepages
D3112 Fetch RFC index and format it 2023-05-20 dereckson datasources
D2980 Provision db-B-001 MariaDB server 2023-04-07 dereckson operations