Optimizing AI for speed, cost and quality

AI-Assisted Coding for Developers

Francesca Donadoni

AI Curriculum Manager, DataCamp

Metrics

124.png

  • Latency (response time): How long it takes for the model to generate a response
AI-Assisted Coding for Developers

Metrics

135.png

  • Latency (response time): How long it takes for the model to generate a response

$$

  • Token cost (per 1M tokens): Monetary expense of using an AI model
AI-Assisted Coding for Developers

Metrics

126.png

  • Latency (response time): How long it takes for the model to generate a response

$$

  • Token cost (per 1M tokens): Monetary expense of using an AI model

$$

  • Quality (pass rate on tests/coverage): How often the generated code works as intended
AI-Assisted Coding for Developers

Model benchmarking

$$

110.png

1 https://github.com/openai/human-eval
AI-Assisted Coding for Developers

Model benchmarking

$$

111.png

1 https://github.com/bigcode-project/bigcodebench
AI-Assisted Coding for Developers

Model benchmarking

$$

112.png

1 https://github.com/SWE-bench/SWE-bench
AI-Assisted Coding for Developers

Model benchmarking

$$

113.png

1 https://github.com/JohnnyPeng18/Coffe
AI-Assisted Coding for Developers

Prompt versioning

115.png

AI-Assisted Coding for Developers

Prompt versioning

118.png

AI-Assisted Coding for Developers

Prompt versioning

119.png

AI-Assisted Coding for Developers

Prompt caching

  • Caching works by storing:
    • Prompt
    • Input
    • Model
    • Temperature

prompt_caching.png

AI-Assisted Coding for Developers

Let's practice!

AI-Assisted Coding for Developers

Preparing Video For Download...