본문으로 이동

Claude

lse

본 문서는 Claude AI의 활용에 대한 내용이다.

chatGPT와는 다른 Claude AI관련 사항을 확인한다.

Claude professional 버전의 활용을 중심으로 설명한다.

Clause AI

클로드는 Anthropic이라는 회사가 개발한 AI 어시스턴트입니다. 클로드의 주요 발전 과정을 살펴보면:

2022년 말: 클로드 1.0이 처음 출시되었습니다.

2023년:

클로드 2가 출시되어 더 발전된 기능을 선보였습니다. 클로드 2.1이 출시되어 성능이 한층 개선되었습니다.

2024년:

클로드 3 제품군이 출시되었습니다. 여기에는:

Claude 3 Haiku: 빠른 속도에 최적화된 모델 Claude 3 Sonnet: 균형잡힌 성능을 제공하는 모델 Claude 3 Opus: 복잡한 작업과 글쓰기에 특화된 모델 이 포함됩니다.

Claude Projects

Pro version의 가장 큰 차이점은 Project의 사용이다.

Projects의 사용


Claude Projects의 주요 특징

클로드 프로젝트의 주요 특징

  • 맞춤형 Custom Instructions 설정
  • 맞춤형 지식 기반 구축
  • 200K 컨텍스트 창 지원
  • 팀 공유 기능
  • 아티팩트(Artifacts) 생성 기능

Custom Instructions의 설정

맞춤형 행동방식 설정을 통해서, AI의 행동 방식, 지식 적용 방법, 응답 스타일을 세밀하게 조정할 수 있다.

  • Projects 만들기

기능설명

[클로드 유투브3:30초]


기능

4가지 추가 기능

  • 컴퓨터 USE 기능

직접 컴퓨터 사용(베타), 1:40초

  • 데이터 분석 기능 (한글 지원)

분석도구, Latex 렌더링, 시각적 PDF 분석

그림파일을 분석해서 답변을 해줌 - 이전에는 따로 해야 함

Cladue computer use

[computer use 예]

[발표 자료]

가상 컴퓨터를 사용하여, 클로드가 컴퓨터를 동작하여, 직접 작업을 실시할 수 있게 함. 가상OS, 에이전트 역할

  • 주의사항 - API키가 있어야 함

Computer use

  • Claude Compute Use 주요기능

컴퓨터 핸들링

* 화면 인식 및 제어 - Claude API를 통해 화면 인식, 카우스 키보드 제어
* 명령어의 컴퓨터 명령어로 변환
* 다양한 도구 및 소프퉤어 활용 - 스프레드 시트, 텍스트 편집기, 브라우저 등 컴퓨터에 있는 유틸리티 AI 직접 사용
  • 작동 순서

1. 사용자 프롬프트에 동작 설명해 주기

2. Claude의 도구 사용 결정 컴퓨터에 있는 사용 도구 정의를 로드하고, 사용자 쿼리에 맞춰 도구 사용 요청을 사용자에게 함

3. 도구 입력 추출 - Claude 요청에서 도구 이름과 입력을 추출, 컨테이너 또는 가상머신에서 도구를 사용

4. Claude 동작 - 사용자가 원하는 결과 도출까지 반복

Computer use 설치

1. 다음의 링크에서 Docker 데스크탑 설치

데스크 탑 설치

2. 터미널로 Claude API키 입력 도커 실행:

docker run -e ANTHROPIC_API_KEY=$ANTHROPIC_API_KEY -v $HOME/.anthropic:/home/computeruse/.anthropic -p 5900:5900 -p 8501:8501 -p 6080:6080 -p 8080:8080 -it ghcr.io/anthropics/anthropic-quickstarts:computer-use-demo-latest

3. http://localhost:8080 으로 실행 API 키 발급 및 사용 - https://console.anthropic.com/settings/keys

4. 한글로 답변하게 설정: system prompt Custom System Prompt Suffix "Answer in Korean"

Claude API key 발급 및 사용

[AI 초보자 가이드, Claude AI Hub]

  • Anthropic API 콘솔 이동
  • API 키생성

Curl을 이용한 API Key 사용

curl https://api.anthropic.com/v1/messages \
 -H "Content-Type: application/json" \
 -H "x-api-key: YOUR_API_KEY" \
 -H "anthropic-version: 2024-10-01" \
 -d '{
   "model": "claude-3-5-sonnet-20241022",
   "max_tokens": 1024,
   "messages": [
     {
       "role": "user",
       "content": "Can you summarize the key findings of the latest research paper on AI ethics?"
     }
   ]
 }'

파이썬 API사용 예

 
<source lang="Python">
import requests
import json

API_KEY = 'YOUR_API_KEY'
url = 'https://api.anthropic.com/v1/messages'

headers = {
    'Content-Type': 'application/json',
    'x-api-key': API_KEY,
    'anthropic-version': '2024-10-01'
}

data = {
    "model": "claude-3-5-sonnet-20241022",
    "max_tokens": 1024,
    "messages": [
        {
            "role": "user",
            "content": "Explain the concept of reinforcement learning in simple terms."
        }
    ]
}

response = requests.post(url, headers=headers, data=json.dumps(data))

if response.status_code == 200:
    print("Claude's response:", response.json()['content'])
else:
    print("Error:", response.status_code, response.text)
</source>


Automate process with claude

[Automate 방법에 대한 유튜브]

  • 1단계

프로세스 문서화

  • 2단계

프롬프트 시퀀스

대화형 프롬프트 시퀀스로 작성할 것 (step by step)

  • 3단계

만들어진 프롬프트 시퀀스를 Claude에 업로드 할 수 있는 instruction 세트로 바꾸기

쳌므인 또는 피드백 루프에 추가해야함

특정 단계 이후에 의견을 요청하는지 확인

Claude Projects

클로드의 프로젝트 기능

  • 의미1

GPTs가 custom GPT라고 불리는 것처럼, 동작 기능에 대한 정의를 사용

  • 의미2

여러 GPTs를 사용하는 것처럼, Projects에서 각각의 역할을 부여하고, 그 결과를 리턴 받아 재귀적 응답 사용

- 찾고 있음... 이게 안나오네...


프로젝트 프로세스

Claude의 프로젝트를 구성하고 결과를 얻는 과정을 단계별로 설명해드리겠습니다:

1. 프로젝트 생성

- claude.ai 웹사이트에서 'Projects' 섹션으로 이동
- 우측 상단의 'Create New Project' 클릭
- 프로젝트 이름과 목적 입력
- 프로젝트 생성 버튼 클릭


2. 커스텀 지시사항 설정

 - 프로젝트의 'Custom Instructions' 섹션으로 이동
 - 다음 요소들을 포함하여 지시사항 작성:
 - 프로젝트의 주요 목적
 - 수행할 작업의 단계별 프로세스
 - 필요한 피드백 루프
 - 결과물의 형식과 스타일
 - 지시사항 저장

3. 프롬프트 시퀀스 구현

 1단계: 초기 입력 받기
 - 사용자로부터 필요한 기본 정보 요청
 - 입력 내용 확인 및 요약

 2단계: 작업 진행
 - 단계별 작업 수행
 - 각 단계마다 피드백 요청
 - 필요시 수정 및 조정

 3단계: 결과물 생성
 - 최종 결과물 제시
 - 품질 확인 및 피드백
 - 필요시 수정 사항 반영

4. 테스트 및 최적화

- 샘플 데이터로 프로세스 테스트
- 피드백 루프 작동 확인
- 결과물 품질 평가
- 필요한 경우 지시사항 수정

5. 실제 사용

- 프로젝트에 실제 데이터/요청 입력
- 프로세스에 따라 단계별 진행
- 피드백 제공하며 결과물 조정
- 최종 결과물 확인 및 저장

6. 결과물 관리

- 생성된 결과물 저장
- 필요시 추가 수정 요청
- 프로젝트 재사용 또는 개선


프로젝트 사용 시 주의사항:

- 명확한 목표와 요구사항 설정
- 구체적인 피드백 제공
- 단계별 결과물 확인
- 일관된 품질 유지를 위한 기준 설정

이러한 구조적 접근을 통해 일관되고 품질 높은 결과물을 얻을 수 있습니다.

개략적 claude 사용법

Claude 사용법 기준설명

이거 직접 해보기 프로젝트 만들기, 순서 instruction 부분


  • Custom instructions about Claude projects

Custom instructions are specific guidelines for AI language models like Claude to tailor their behaviour, output, and capabilities for particular tasks or projects. These instructions serve as a way to “program” the AI, ensuring it responds in a manner that aligns with the user’s goals and project requirements.

  • Best practices for Format and Syntax

When crafting custom instructions for Claude projects, consider the following best practices:

1. use Clear and Concise Language Write instructions that are easy to understand and leave no room for ambiguity.

2. Organize with Headers Use markdown headers to structure your instructions logically.

3. Utilize Lists Emply numbered or bulleted lists for step-by-step processes logically.

4. Specify Desired Output Format Clearly state how you want the information presented. (e.g. as a table, list or paragraph)

5. Include Examples Provide sample inputs and outputs to illustrate your expecatations

6. Use Code Blocks Use markdown code blocks for any code-related instructions for clarity.

7. Define Scope and limitations Clearly state what the AI should and should not do.

8. Encourage Flexibility Allow the AI to use its judgement when apporpriate.

  • 요약
  1. 명확하고 간결한 언어 사용
  2. 목차 (마크다운으로 header 생성) - 흐름
  3. 세부 목차 - 세부 내용
  4. 결과 예상
  5. 예시 포함
  6. 코드도 포함
  7. 범주, 제한 제시
  8. 직접 판단 여유 주기


  • Example: Custom Instructions for a Project Management Web App.

Custom Instruction - 한글이 잘 안된다고 하는데... 테스트 해볼 것

# Custom Instructions for Project Management Web App.

## Role and Purpose
You are assisting in the development of a project management web application. your primary function is to provide guidance, code snippets, and explanatiuons related to this project.

## General Behavior
- Prioritize clarity and efficiency in your responses.
- When providing code, use appropriate syntax highlighting.
- If unsure about a specific reqirement, ask for clarification before proceeding

## Technical Specifications
- Frontend: React.js with TypeScript
- Backend: Node.js with Express
- Database: MongoDB
- State Management: Redux
- UI Framework: Material-UI

## Key Features to Implement
1. User Authentication
2. Project Creation and Management
3. Task Assignment and Tracking
4. Team Collabortion Tools
5. Gantt Chart for Project Timeline
6. Dashboard with Project Analytics

## Code Style and Best Practices
- Follow React Hooks paradigm for functional components.
- Implement proper error handling and input validation.
- Write clean, modular, and well-commented code.
- Adhere to TypeScript best practices for type safety.

## Output Preferences
- When providing code snippets, include brief explanations of the code's functionality.
- For complex features, break down the implementation into step-by-step instructions.
- Suggest testing stratagies for critical components.

## Limitations
- Do not provide complete applicatyion code: focus on specific components or functions as requested.
- Avoid discussing deployment strategies or DevOps practices unless explicily asked.

## Additional Notes
- Be prepared to explain concepts related to state management, API integration, and database schema design.
- Offer suggestions for performance optimization and scalability when relevant.

This covers the project's technical stack, key features, coding standards, and output preferences, giving Claude a clear framework for providing relevant and helpful assistance.

클로드 사용자 지시


Using Clear and Concise Language in AI Instructions

  • Enhancing AI Communication Effectiveness

When workign with AImodels like Claude, the clarity of your instructions can significantly impact the success of your project. Clear and concise language ensures that the AI understands your reqrirement precisely, leading to more accurate and useful outpouts.

  • Why clear and concise language matters
- Reduces Misinterpretation: Ambiguous instructions can lead to unexpected or incorrect results.
- Save Time: Clear instructions mean fewer iterations and revisions.
- Improves Consistency: Well-defined instructions produce more consistent outputs across muliple runs.
- Enhances Efficiency: AI models can process and act on clear instructions more quickly.
  • Tips for writing clear and concise instructions
  1. Use Simple Words: Avoid jargon or complex terminology unless necessary.
  2. One Idea per Sentence: instead of vague requests, provide detailed instructions.
  3. Acitive Voice: Use active voice for more direct and clear instruction.
  4. Avoid Ambiguity: Clarify an terms that could have multiple interpretations.
  5. Quantify When Possible: Use numbers and specific measurements where applicable.


  • Examples

Example 1: Data Analysis

Unclear: "Look at the sales data and tell me what's interesting."

Clear: "Analyze the monthly sale data from the past year. Identify the top 3 performing products, calculate the average sale value, and highlight any months where sales dropped by more than 10% compared to the previous month."

Example 2: Content Creation

Unclear: "Write somthing about healthy eating."

Clear: "Write 500-word bold post about the bernefits of a Mediterranean diet. Include at least 3 key health benefints, 4 staple foods of this diet, and 2 simple recipes. Use subheadings to organize the content."

Example 3: Image Editing

Unclear: "Make the picture look nicer."

Clear: "Adjust the imaage as follows: Increase brightness by 15%, enhance the contrast by 10%, apply a slight warm color filter(RGB values:255, 240, 220 at 20% opacity), and sharpen the overall image by 25%"

Example 4: Code Optimization

Unclear: "Make this code run faster."

Clear: "Optimize the given Python functions to reduce its execution time. Focus on minimizing nested loops, replacing inefficient data structures with more appropriate ones, and utilizing built-in functions where possible. Aim for a 30% reduction in processing time for an input size of 10,000 elements."

간결하고 정확한 표현

Organizing AI Instructions With Headers

Structuring for clarity and comprehension.

Organization is key when providing complex instructions to AI models. Effectively using headers can significantly improve the clarity and structure of your instructions, making them easier for both humans and AI to follow and understand.

  • Benefits of Using Headers
- Improved Readability: Headers break up large blocks of text, making insturctions more digestible.
- Clear Structure: They provide a logical flow to your insturctions guiding the AI through different sections.
- Easy Navigation: Headers allow quick document scanning to find specific information
- Enhanced Understanding: They help the AI model to categorize better and process differnet parts of the instructions.


  • Best Practices for Using Headers
  1. . Use Hierarchy: Employ different levels of headers (H2, H3, H4) to show the relationship between sections.
  2. . Be Desciptive: Use clear, concise language in your headers that accurately describes the following content.
  3. . Maintain Consistency: Use similar phrasing and grammatical structures across your headers.
  4. . Keep It Short: Headers should be brief, ideally no more than 6~8 words.
  5. . Use Keywords: Includie importiant keywords in your headers to improve searchability.


  • Examples of Effective Header Use

Example 1: Writing a Research Paper

## Introduction
### Background Information
### Thesis Satement

## Literature Review
### Current State of Research
### Gaps in Existing Studies

## Methodology
### Data Collections
### Analysis Techniques

## Results
### Key Findings
### Statistical Analysis

## Discussion
### Interpretation of Results
### Implications for the Field

## Conclusion
### Summary of Findings
### Future Research Directions

Example 2: Developing a Mobile App

 
## Project Overview
### App Purpose and Target audience
### key Features

## Design Phase
### User Interfface Mockups
### User Experience Flow

## Development
### Frontend Development
#### UI Implementation
#### State Management
### Backend Development
#### API Design
#### Database Structure

## Testing
### Unit Testing
### Integration Testing
### User Acceptance Testing

## Deployment
### App Store Submission
### Marketing Strategy

By organizing your AI instructions with clear, descriptive headers, you create a roadmap that guides the AI through complex tasks.

잘정의된 목차

참고 사항

Youtube Claude project사용법, 11분20초~

Claude에서 Assigning role, 페르소나 주기

flow 디자인, 구독 $20