![]() |
![]() |
![]() |
![]() |
|---|---|---|---|
| ๐ผ์ ์ํ๐ผ | ๐ฑ์ก์ค์ฃผ๐ฑ | ๐ถํ์ ๊ฒฝ๐ถ | ๐ค์๋ค์ฐ๐ค |
| Server / Data / BE | AI / Data / BE | Infra / BE / FE | BE / FE |
Mappings
{
"mappings": {
"properties": {
"Author": {
"type": "text",
"fields": {
"keyword": {
"type": "text",
"analyzer": "author_analyzer"
},
"partial": {
"type": "text",
"analyzer": "edge_ngram_analyzer"
}
}
},
"DetailCategory": {
"type": "keyword"
},
"ISBN": {
"type": "keyword"
},
"ImageURL": {
"type": "keyword"
},
"IndexContent": {
"type": "text"
},
"Introduction": {
"type": "text"
},
"MiddleCategory": {
"type": "keyword"
},
"Price": {
"type": "integer"
},
"PubDate": {
"type": "date",
"format": "yyyy-MM-dd"
},
"Publisher": {
"type": "keyword"
},
"PublisherReview": {
"type": "text"
},
"PurchaseURL": {
"type": "keyword"
},
"Search": {
"type": "text"
},
"Title": {
"type": "text",
"analyzer": "title_analyzer"
},
"Vector": {
"type": "dense_vector",
"dims": 768,
"index": true,
"similarity": "cosine"
},
"document": {
"type": "object"
},
"id": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"index": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"pipeline": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
}
}
}
}
1๏ธโฃย [POST] BASE_URL/api/book/recommendation
: ์ ์ ๊ฐ ์ํ๋ ๋ด์ฉ์ ์ ๋ ฅํ๋ฉด ์ ๋ ฅํ ๋ด์ฉ์ ๋ง๊ฒ ai๊ฐ ์ฑ ์ ์ถ์ฒํด์ค๋ค.
2๏ธโฃย Request
-
โ๐ปRequest Header
Content-Type: application/json -
โ๐ปRequest Body
Name Type Description Required query String ์ต๋ 1365์(ํ๊ธ๊ธฐ์ค) Required { "query" : "aws์ ์ ์ฌํ ํด๋ผ์ฐ๋ ์๋น์ค๋ฅผ ๊ณต๋ถํ๊ณ ์ถ์๋ฐ ๊ด๋ จ ์ฑ ์ถ์ฒํด์ค" }
3๏ธโฃย Response
-
โ๐ป์ฑ๊ณต
Name Type Description code Integer ์ํ ์ฝ๋ message String ์ํ ๋ฉ์์ง data List ์ํ ์ฝ๋ - recommendedBookList List ai๊ฐ ์ถ์ฒํ๋ ์ฑ , list๋ ์ถ์ฒ์์ผ๋ก ์ ๋ ฌ๋จ. -- isbn Long ์ฑ ์ 13์๋ฆฌ isbn -- title String ์ฑ ์ด๋ฆ -- author String ์ฑ ์ ์(๋ค) -- image String ์ฑ ํ์ง ์ด๋ฏธ์ง url -- price Long ์ฑ ์ ๊ฐ๊ฒฉ(์ฌ๊ณ ๊ฒ์์ ์ํด ํ์) { "message": "์ฑ ์ ์ฑ๊ณต์ ์ผ๋ก ์ถ์ฒํ์ต๋๋ค.", "data": { "recommendedBookList": [ { "isbn": "9791158391317", "title": "์๋น์ค ์ด์์ด ์ฌ์์ง๋ AWS ์ธํ๋ผ ๊ตฌ์ถ ๊ฐ์ด๋ (์๋ฒ ๊ตฌ์ถ๋ถํฐ ๋ฐฐํฌ, ๋ชจ๋ํฐ๋ง, ๊ด๋ฆฌ ์๋ํ, ๋ฐ๋ธ์ต์ค๊น์ง)", "author": "๊น๋ดํ", "image": "https://shopping-phinf.pstatic.net/main_3243626/32436267587.20221227210159.jpg", "price": 24300 }, { "isbn": "9791158393977", "title": "AWS ๊ตฌ์กฐ์ ์๋น์ค (AWS์ ์ ์ฒด ๊ตฌ์กฐ์ ๊ธฐ์ ์ด ํ๋์ ๋ค์ด์ค๋ ์๋ง์กด ์น ์๋น์ค ํต์ฌ ๊ฐ์ด๋)", "author": "์ฐ์๋ ธ ํ๋ฏธ์ํค^์ฝ๋ฐ์ผ์ ์ฟํค์ด^์ค์์ ์ฝ์ค์ผ^๋ค์นด๋์ ํ ๋ชจ์ ํค", "image": "https://shopping-phinf.pstatic.net/main_3773568/37735685622.20230313183543.jpg", "price": 17100 }, { "isbn": "9791198189295", "title": "ํด๋ผ์ฐ๋ ์๋น์ค ๊ฐ๋ฐ์๋ฅผ ์ํ AWS๋ก ๊ตฌํํ๋ CI/CD ๋ฐฐํฌ ์ ๋ฌธ (์ ์ ๊ฐ๋ฐ์๋ถํฐ ์ค์ ์๋น์ค ๊ตฌ์ถ ๊ฒฝํ์ด ์๋ ๋ชจ๋ ๊ฐ๋ฐ์๋ฅผ ์ํ ์ค๋ฌด ๋ฐ์ฐฉํ ์ ๋ฌธ์)", "author": "์ต์ฃผํธ^์ ์ฌ์^์ ๋์ง", "image": "https://shopping-phinf.pstatic.net/main_3817483/38174830618.20230926084650.jpg", "price": 18000 }, { "isbn": "9791161757087", "title": "AWS ์ฟก๋ถ (๊ฐ๋ ๊ณผ ์์ ๋ฅผ ๋ค๋ฃจ๋ ์ค์ฉ ์๋ด์)", "author": "์กด ์ปฌํจ^๋ง์ดํฌ ์์กด", "image": "https://shopping-phinf.pstatic.net/main_3636192/36361929618.20230711113104.jpg", "price": 31500 }, { "isbn": "9791161756080", "title": "Amazon VPC ๋คํธ์ํน ์๋ฆฌ์ ๋ณด์ (AWS ํ ํด๋ก์ง๋ก ์ดํดํ๋, 2022๋ ์ธ์ข ๋์ ํ์ ๋ถ๋ฌธ ์ ์ ๋์)", "author": "์ฐจ์ ๋", "image": "https://shopping-phinf.pstatic.net/main_3245798/32457980676.20230919123526.jpg", "price": 28800 }, { "isbn": "9791158391201", "title": "AWS ์์คํ ์ค๊ณ์ ๋ง์ด๊ทธ๋ ์ด์ (์๋ง์กด์น์๋น์ค ์ ๋ฌด์์คํ ์ค๊ณ์ ๋ง์ด๊ทธ๋ ์ด์ ์์ํ ๋ฒ ์คํธํ๋ํฐ์ค)", "author": "์ฌ์ฌํค ํ์ฟ ๋ก^ํ์ผ์ ์ ์ด์น๋ก^์ธํ ์ง๋ง ํ ์ํ๋ก^๋ฏธ์ผ์นด์ ๋ฃ^์นด๋์์ ์ผ์ด", "image": "https://shopping-phinf.pstatic.net/main_3248956/32489567071.20220527042551.jpg", "price": 26600 }, { "isbn": "9791190014595", "title": "ํ์ ์คํฌ๋ฆฝํธ, AWS ์๋ฒ๋ฆฌ์ค๋ก ๋ค์ด์ฌ๋ฆฌ๋ค (์ค์ง ๊ฐ๋ฐ์๋ง ์ง์คํ ์ ์๊ฒ ๋์์ฃผ๋ ์ค๋ฌด ๊ฐ์ด๋)", "author": "์ ๊ทํ", "image": "https://shopping-phinf.pstatic.net/main_3248371/32483718302.20221229074737.jpg", "price": 34200 }, { "isbn": "9791190014304", "title": "๋น์ ์ด ์ง๊ธ ์์์ผ ํ AWS (ํ ๋ฒ ์ฝ์ผ๋ฉด ์ ๋๋ก ๋จ๋ AWS ํด๋ผ์ฐ๋ ์ ๋ฌธ์)", "author": "์ด์ํธ", "image": "https://shopping-phinf.pstatic.net/main_3248653/32486532057.20230214162810.jpg", "price": 25200 }, { "isbn": "9791158394608", "title": "์ง์ง ์ฑGPT API ํ์ฉ๋ฒ (ChatGPT API ๊ธฐ๋ฐ์ ์์ฑ ๋น์๋ถํฐ ์นด์นด์คํก/ํ ๋ ๊ทธ๋จ ์ฑ๋ด ์ ์, ๋ญ์ฒด์ธ ํ์ฉ, ํ์ธํ๋๊น์ง)", "author": "๊น์ค์ฑ^์ ์์ค^์์์ค", "image": "https://shopping-phinf.pstatic.net/main_4187308/41873081621.20230906071215.jpg", "price": 23940 }, { "isbn": "9788931457070", "title": "Amazon Web Services๋ก ์์ํ๋ ํด๋ผ์ฐ๋ ์ ๋ฌธ (์๋ฒ๊ตฌ์ถ๊ฒฝํ์ด์ ์ด๋!ํ๋ก๊ทธ๋จ๊ฐ๋ฐ์๋์ฝ๊ฒ!๊ธฐ์ด๋ถํฐ์์์๋ํด๋ผ์ฐ๋์ ๋ฌธ)", "author": "WINGS ํ๋ก์ ํธ ์์ฌ ์ํธ", "image": "https://shopping-phinf.pstatic.net/main_3250463/32504635060.20220527044714.jpg", "price": 24300 } ] } } -
โ๐ป์คํจ
-
ํ์ํ ๊ฐ์ด ์๋ ๊ฒฝ์ฐ
{ "code": 400, "message": "query๊ฐ ์์ต๋๋ค.", "data": null } -
์๋ฒ์๋ฌ
{ "code": 500, "message": "์๋ฒ ์๋ฌ", "data": null }
-
- ๋ชจ๋ธ ์ค๋ช
:
- ๋ณธ ๋ชจ๋ธ์ Sentence-transformers๋ฅผ ๊ธฐ๋ฐ์ผ๋ก ํ๋ฉฐ KLUE์ STS(Sentence Textual Similarity) ๋ฐ์ดํฐ์ ์ ํตํด ํ๋ จ์ ์งํํ ๋ชจ๋ธ์ ๋๋ค.
- ํ๊ตญ์ด ๋ฌธ์ฅ๊ฐ ๊ฒฐ์์ฑ ์ธก์ ๋๊ตฌ์ธ K-TAACO(๊ฐ์ )์ ์งํ ์ค ํ๋์ธ ๋ฌธ์ฅ ๊ฐ ์๋ฏธ์ ๊ฒฐ์์ฑ์ ์ธก์ ํ๊ธฐ ์ํด ๋ณธ ๋ชจ๋ธ์ ์ ์ํ์์ต๋๋ค.
- ๋ฌธ์ฅ ๊ฐ ์๋ฏธ์ ์ ์ฌ๋ ์ธก์ :
- Sentence Transformers: ์ด ๋ผ์ด๋ธ๋ฌ๋ฆฌ๋ ๋ฌธ์ฅ ๊ฐ์ ์ฌ์ฉ๋ LLM ๋ชจ๋ธ์ ๋ฌธ์ฅ ์ ์ฌ๋ ๋น๊ต๋ฅผ ์ํด ํน๋ณํ ์ค๊ณ๋์์ ์๋ฏธ์ ์ ์ฌ๋๋ฅผ ๊ณ์ฐํ๊ธฐ ์ํด ์ต์ ํ๋์ด ์์ต๋๋ค.
- ํ๊ตญ์ด๋ก ํ๋๋ Sentence Transformers ๋ชจ๋ธ์ ์ฌ์ฉํ๋ฉด, ๋ฒกํฐ ๊ณต๊ฐ์์ ๋ฌธ์ฅ์ ์๋ฏธ๋ฅผ ์ ํํ๊ฒ ์บก์ฒํ๊ณ , ์ด๋ฅผ ๋ฐํ์ผ๋ก ์ ์ฌ๋๋ฅผ ํจ์จ์ ์ผ๋ก ๊ณ์ฐํ ์ ์์ต๋๋ค.
- ์ฌ์ฉ์ ์ฟผ๋ฆฌ์ ๋์ ๋ชฉ์ฐจ ๊ฐ์ ์ ์ฌ๋๋ฅผ ๊ณ์ฐํ๋ ์ฉ๋๋ก ๋งค์ฐ ์ ํฉํฉ๋๋ค.
API Gateway: ์ฌ์ฉ์๋ก๋ถํฐ ์ฑ ์ถ์ฒ ์์ฒญ์ ๋ฐ์ Lambda ํจ์๋ก ์ ๋ฌํฉ๋๋ค.Lambda ํจ์: ์ฌ์ฉ์์ ์์ฒญ์ ์ฒ๋ฆฌํ๊ณ , ES Cloud์ LLM ๋ชจ๋ธ์ ์ฌ์ฉํ์ฌ ์ ์ ํ ์ฑ ๋ฐ์ดํฐ๋ฅผ ๊ฒ์ํฉ๋๋ค.ES Cloud:- LLM ๋ชจ๋ธ: ์ฌ์ฉ์ ์ฟผ๋ฆฌ๋ฅผ ๋ฐํ์ผ๋ก ๊ด๋ จ์ฑ ๋์ ๋์ ์ ๋ณด๋ฅผ ๋ถ์ํฉ๋๋ค.
- book-index: ์ฑ ์ ๋ฉํ๋ฐ์ดํฐ๋ฅผ ์ ์ฅํ๊ณ ๊ฒ์ํฉ๋๋ค.
- KNN ๊ฒ์: LLM ๋ชจ๋ธ์ ๊ฒฐ๊ณผ๋ฅผ ํ์ฉํ์ฌ ๋์ ๋ฐ์ดํฐ์์ ๊ฐ์ฅ ์ ์ฌํ ํญ๋ชฉ์ ์ฐพ์๋ ๋๋ค.
Open AI: ๋ณธ ์์คํ ์ Open AI์ ๊ธฐ๋ฅ์ ํ์ฉํ์ฌ ์ฌ์ฉ์ ์ฟผ๋ฆฌ์ ์ต์ ํ๋ ๊ฒฐ๊ณผ๋ฅผ ์ ๊ณตํฉ๋๋ค.
- ์ฌ์ฉ์๋ ์น ์ธํฐํ์ด์ค๋ฅผ ํตํด ์ฑ ์ถ์ฒ์ ์ํ ์ฟผ๋ฆฌ๋ฅผ API Gateway์ ์ ์กํฉ๋๋ค.
- API Gateway๋ ์ด ์์ฒญ์ Lambda ํจ์์ ์ ๋ฌํฉ๋๋ค.
- Lambda ํจ์๋ LLM ๋ชจ๋ธ์ ํ์ฉํ์ฌ ES Cloud ๋ด์
book-index์์ ์ฟผ๋ฆฌ์ ๊ด๋ จ๋ ๋์ ์ ๋ณด๋ฅผ ๊ฒ์ํฉ๋๋ค. - ๊ฒ์ ๊ฒฐ๊ณผ๋ KNN ์๊ณ ๋ฆฌ์ฆ์ ํตํด ๋์ฑ ์ ์ ๋์ด, ๊ฐ์ฅ ๊ด๋ จ์ฑ ๋์ ๋์ ๋ชฉ๋ก์ด ์ถ์ถ๋ฉ๋๋ค.
- ์ต์ข ์ถ์ฒ ๋์ ๋ชฉ๋ก์ ์ฌ์ฉ์์๊ฒ ์๋ต์ผ๋ก ๋ฐํ๋ฉ๋๋ค.
-
ํค์๋ ์ ์ : ์ฌ์ฉ์์ ์ฟผ๋ฆฌ์์ ์ค์ํ ํค์๋ 2๊ฐ๋ฅผ OpenAI ํ๋กฌํํธ๋ฅผ ํ์ฉํ์ฌ ์ ์ ํฉ๋๋ค.
-
Elasticsearch ๊ฒ์: ์ ์ ๋ ํค์๋๋ฅผ ์ด์ฉํด Elasticsearch์์ย
boolยmatchย ์ฟผ๋ฆฌ ์กฐ๊ฑด์ ์ถ๊ฐํ๊ณ , ์ธ๋ฑ์ค ๋ด์ ๋ฐ์ดํฐ์ ์ฌ์ฉ์ ์ฟผ๋ฆฌ์ ๋ฒกํฐ ์ ์ฌ๋๋ฅผ ๊ฒ์ํฉ๋๋ค.
-
Docker ์ด๋ฏธ์ง ๋น๋ ๋ฐ ECR ํธ์: ํด๋น ๊ธฐ๋ฅ์ ๊ตฌํํ ์ฝ๋๋ฅผ Docker ์ด๋ฏธ์ง๋ก ๋น๋ํ๊ณ , ์์ฑ๋ ์ด๋ฏธ์ง๋ฅผ Amazon ECR๋ก ํธ์ํฉ๋๋ค.
-
AWS Lambda ์ฐ๊ฒฐ: Amazon ECR์ ํธ์๋ ์ด๋ฏธ์ง๋ฅผ ๊ธฐ๋ฐ์ผ๋ก AWS Lambda ํจ์๋ฅผ ์์ฑํ์ฌ ์๋ฒ๋ฆฌ์ค ๋ฐฑ์๋๋ฅผ ๊ตฌํํฉ๋๋ค.
-
AWS API Gateway ์ฐ๊ฒฐ: ์์ฑ๋ AWS Lambda ํจ์๋ฅผ AWS API Gateway์ ๋ฉ์๋๋ฅผ ์์ฑํ์ฌ ์ฐ๊ฒฐํฉ๋๋ค.








