llm-application-dev

Featured

Building applications with Large Language Models - prompt engineering, RAG patterns, and LLM integration. Use for AI-powered features, chatbots, or LLM-based automation.

AI & Automation 1,005 stars 113 forks Updated 1 months ago MIT

Install

View on GitHub

Quality Score: 96/100

Stars 20%
100
Recency 20%
75
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# LLM Application Development ## Prompt Engineering ### Structured Prompts ```typescript const systemPrompt = `You are a helpful assistant that answers questions about our product. RULES: - Only answer questions about our product - If you don't know, say "I don't know" - Keep responses concise (under 100 words) - Never make up information CONTEXT: {context}`; const userPrompt = `Question: {question}`; ``` ### Few-Shot Examples ```typescript const prompt = `Classify the sentiment of customer feedback. Examples: Input: "Love this product!" Output: positive Input: "Worst purchase ever" Output: negative Input: "It works fine" Output: neutral Input: "${customerFeedback}" Output:`; ``` ### Chain of Thought ```typescript const prompt = `Solve this step by step: Question: ${question} Let's think through this: 1. First, identify the key information 2. Then, determine the approach 3. Finally, calculate the answer Step-by-step solution:`; ``` ## API Integration ### OpenAI Pattern ```typescript import OpenAI from 'openai'; const openai = new OpenAI({ apiKey: process.env.OPENAI_API_KEY }); async function chat(messages: Message[]): Promise<string> { const response = await openai.chat.completions.create({ model: 'gpt-4', messages, temperature: 0.7, max_tokens: 500, }); return response.choices[0].message.content ?? ''; } ``` ### Anthropic Pattern ```typescript import Anthropic from '@anthropic-ai/sdk'; const anthropic = new Anthropic({ apiKey: proce...

Details

Author
MoizIbnYousaf
Repository
MoizIbnYousaf/Ai-Agent-Skills
Created
5 months ago
Last Updated
1 months ago
Language
JavaScript
License
MIT

Integrates with

Related Skills