this post was submitted on 06 Jul 2023
7 points (100.0% liked)

Actually Useful AI

1990 readers
1 users here now

Welcome! ๐Ÿค–

Our community focuses on programming-oriented, hype-free discussion of Artificial Intelligence (AI) topics. We aim to curate content that truly contributes to the understanding and practical application of AI, making it, as the name suggests, "actually useful" for developers and enthusiasts alike.

Be an active member! ๐Ÿ””

We highly value participation in our community. Whether it's asking questions, sharing insights, or sparking new discussions, your engagement helps us all grow.

What can I post? ๐Ÿ“

In general, anything related to AI is acceptable. However, we encourage you to strive for high-quality content.

What is not allowed? ๐Ÿšซ

General Rules ๐Ÿ“œ

Members are expected to engage in on-topic discussions, and exhibit mature, respectful behavior. Those who fail to uphold these standards may find their posts or comments removed, with repeat offenders potentially facing a permanent ban.

While we appreciate focus, a little humor and off-topic banter, when tasteful and relevant, can also add flavor to our discussions.

Related Communities ๐ŸŒ

General

Chat

Image

Open Source

Please message @[email protected] if you would like us to add a community to this list.

Icon base by Lord Berandas under CC BY 3.0 with modifications to add a gradient

founded 1 year ago
MODERATORS
 

If you are like me, and you didn't immediately understand why people rave about Copilot, these simple examples by Simon Willison may be useful to you:

you are viewing a single comment's thread
view the rest of the comments
[โ€“] [email protected] 3 points 1 year ago* (last edited 1 year ago)

The biggest aha-moment with Copilot for me was when I wanted to implement tools for my GPT-based personal assistant. The function calling wasn't yet available in the OpenAI API, and I've found that GPT-3.5 was really bad at using tools consistently in a long chat conversation. So I decided to implement a classifier DAG, with either a simple LLM prompt or a regular function in its nodes. Something like this:

what is this? (reminder | todo | other)
    reminder -> what kind of reminder? (one-time | recurring)
        one-time -> return the ISO timestamp and the reminder text in a JSON object like this
        recurring -> return the cron expression and the reminder text in a JSON object like this
    todo -> what kind of todo operation (add | delete | ...)
        ...
    other -> just respond normally

I wrote an example of using this classifier graph in code, something like this (it's missing a lot of important details):

const decisionTree = new Decision(
  userIntentClassifier, {
    "REMINDER": new Decision(
      reminderClassifier, {
        "ONE_TIME": new Sequence(
          parseNaturalLanguageTime,
          createOneTimeReminder,
          explainAction
        ),
        "RECURRING": new Sequence(
          createRecurringReminder,
          explainAction
        ),
      }
    ),
    "TASK": new Decision(
      taskClassifier, {
        ...
      }
    ),
    "NONE": answerInChat,
  }
);

decisionTree.call(context);

And then I started writing class Decision, class Sequence, etc. and it implemented the classes perfectly!