Skip to content

yingkitw/granite-code-prompt

Repository files navigation

Granite 3 Prompt Cookbook for Coding

this repo target to share potential use case and prompt on granite 3 models and WCA.

  • get the WCA Chat use cases and sample command in chat.

Prompting with IBM Granite 3 Model for Coding Use Cases

I utilising the latest IBM Granite 3 8B Instruct Model for these coding tasks. This model is lightweight and supports a wide range of programming languages, making it ideal for diverse coding needs. Experiment Objectives The experiment focuses on several key areas, grouped into Code Understanding and Code Generation:

Code Understanding

  • Code Explanation: Break down complex code snippets to make them easier to understand.
  • Code Documentation: Automatically generate detailed documentation to keep records up-to-date.
  • Code Review: Analyze code for potential improvements and ensure adherence to best practices.

Code Generation

  • Code Improvement: Suggest optimizations to enhance efficiency and performance.
  • Code Conversion: Translate code between different programming languages.
  • Code Fixing: Identify and resolve bugs or errors in existing code.
  • API Generation: Automatically create APIs from given specifications.
  • Test Case Generation: Develop test cases to ensure code reliability and performance.
  • Diagram Generation: Visualize code structure and workflows through generated diagrams.

Sample Prompt and Result for different programming languages

About

Granite-Code Prompt Cookbook

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published