Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

hj0302
Copy link
Contributor

@hj0302 hj0302 commented Jan 8, 2025

[Title] 05-Qdrant
[Version] initial
[Language] ENG
[Package] langsmith, langchain_openai, langchain_qdrant, fastembed, qdrant_client

{PR Message - Write freely, remove this bracket if unnecessary}

Author Checklist

  • PR Title Format: I have confirmed that the PR title follows the correct format. (e.g., [N-2] 07-Text Splitter / 07-RecursiveCharacterTextSplitter)

  • Committed Files: I have ensured that no unnecessary files (e.g., .bin, .gitignore, poetry.lock, pyproject.toml) are included. These files are not allowed.

  • (Optional) Related Issue: If this PR is linked to an issue, I have referenced the issue number in the PR message. (e.g., Fixes Update 01-PromptTemplate.ipynbย #123)

  • โŒ Do not include unnecessary files (e.g., .bin, .gitignore, poetry.lock, pyproject.toml) or other people's code. If included, close the PR and create a new PR.

Review Template (Intial PR)

๐Ÿ–ฅ๏ธ OS: Win/Mac/Linux   
โœ… Checklist      
 - [ ] **Template**: Tutorials follows the required template. 
 - [ ] **Table of Contents(TOC) Links**: All Table of Contents links work. ((Yes/No)
 - [ ] **Image**: Image filenames follow guidelines.
 - [ ] **Imports*: All import statements use the latest versions. Ensure "langchain-teddynote" is not used. 
 - [ ] **Code Execution**: Code runs without errors.
 - Comments: {Write freely, ํ•œ๊ตญ์–ด ๊ธฐ์ˆ  ๊ฐ€๋Šฅ}     

If no one reviews your PR within a few days, please @-mention one of teddylee777, musangk, BAEM1N

[Title] 05-Qdrant
[Version] initial
[Language] ENG
[Package] langsmith, langchain_openai, langchain_qdrant, fastembed,  qdrant_client
@hj0302 hj0302 self-assigned this Jan 8, 2025
Copy link
Contributor

@namyoungkim namyoungkim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

๐Ÿ–ฅ๏ธ OS: Mac
โœ… Checklist

  • Template: Tutorials follows the required template.
  • Table of Contents(TOC) Links: All Table of Contents links work. ((Yes/No)
  • Image: Image filenames follow guidelines.
  • *Imports: All import statements use the latest versions. Ensure "langchain-teddynote" is not used.
  • Code Execution: Code runs without errors.
  • Comments: ์ž‘์„ฑํ•˜์‹œ๋А๋ผ, ๊ณ ์ƒํ•˜์…จ์Šต๋‹ˆ๋‹ค! Template ์ ์šฉ ๊ด€๋ จ ๋ฆฌ๋ทฐ๋‚ด์šฉ ๊ณต์œ ๋“œ๋ ค์š”! ๐Ÿ™‡๐Ÿปโ€โ™‚๏ธ
    • ํ…œํ”Œ๋ฆฟ rule
      1. ## Environment Setup ํ…œํ”Œ๋ฆฟ์ด ์—†์–ด์ง„ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค! ๋ฐ˜์˜ ๋ถ€ํƒ๋“œ๋ฆฝ๋‹ˆ๋‹ค~!
      • image
      1. images ํด๋”๋ช…์œผ๋กœ pngํŒŒ์ผ์ด ์ €์žฅ๋˜๊ณ  ์žˆ๋Š”๋ฐ์š”.
      • image
      • data ํด๋”๋กœ ์‚ฌ์šฉํ•˜๊ธฐ๋กœ ๊ทœ์น™์ด ์ •ํ•ด์ง„ ๊ฒƒ์œผ๋กœ ์•Œ๊ณ  ์žˆ์–ด์š”. images ํ•˜์œ„๋กœ ํŒŒ์ผ์ด ๋‹ค์Œ ๊ทธ๋ฆผ ์ฒ˜๋Ÿผ๊ด€๋ฆฌ๋˜๋ฉด ์ข‹์„ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค. (๋‹ค์Œ ๊ทธ๋ฆผ๊ณผ ๊ฐ™์ด)
        • image
      1. backtick, bold๋Š” ์ขŒ ์šฐ์— space๋ฅผ ๊ผญ ๋„์›Œ์ฃผ์„ธ์š”! -> ๊ด€๋ จ ๋‚ด์šฉ์€ ์ˆ˜์ • ํ›„ ์ปค๋ฐ‹ํ–ˆ์Šต๋‹ˆ๋‹ค!
      2. ํ™˜๊ฒฝ์„ค์ • / ํŒจํ‚ค์ง€ ์„ค์น˜ ๊ฐ€์ด๋“œ์˜ pip command๋Š” ๊ผญ !pip๊ฐ€ ์•„๋‹Œ %pip๋กœ ์ˆ˜์ • ๋ถ€ํƒ๋“œ๋ฆฝ๋‹ˆ๋‹ค!

[Title] 05-Qdrant
[Version] fix
[Language] ENG
[Package] langsmith, langchain_openai, langchain_qdrant, fastembed,  qdrant_client
@hj0302
Copy link
Contributor Author

hj0302 commented Jan 10, 2025

๐Ÿ–ฅ๏ธ OS: Mac โœ… Checklist

  • Template: Tutorials follows the required template.

  • Table of Contents(TOC) Links: All Table of Contents links work. ((Yes/No)

  • Image: Image filenames follow guidelines.

  • *Imports: All import statements use the latest versions. Ensure "langchain-teddynote" is not used.

  • Code Execution: Code runs without errors.

  • Comments: ์ž‘์„ฑํ•˜์‹œ๋А๋ผ, ๊ณ ์ƒํ•˜์…จ์Šต๋‹ˆ๋‹ค! Template ์ ์šฉ ๊ด€๋ จ ๋ฆฌ๋ทฐ๋‚ด์šฉ ๊ณต์œ ๋“œ๋ ค์š”! ๐Ÿ™‡๐Ÿปโ€โ™‚๏ธ

    • ํ…œํ”Œ๋ฆฟ rule

      1. ## Environment Setup ํ…œํ”Œ๋ฆฟ์ด ์—†์–ด์ง„ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค! ๋ฐ˜์˜ ๋ถ€ํƒ๋“œ๋ฆฝ๋‹ˆ๋‹ค~!
      • image
      1. images ํด๋”๋ช…์œผ๋กœ pngํŒŒ์ผ์ด ์ €์žฅ๋˜๊ณ  ์žˆ๋Š”๋ฐ์š”.
      • image
      • data ํด๋”๋กœ ์‚ฌ์šฉํ•˜๊ธฐ๋กœ ๊ทœ์น™์ด ์ •ํ•ด์ง„ ๊ฒƒ์œผ๋กœ ์•Œ๊ณ  ์žˆ์–ด์š”. images ํ•˜์œ„๋กœ ํŒŒ์ผ์ด ๋‹ค์Œ ๊ทธ๋ฆผ ์ฒ˜๋Ÿผ๊ด€๋ฆฌ๋˜๋ฉด ์ข‹์„ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค. (๋‹ค์Œ ๊ทธ๋ฆผ๊ณผ ๊ฐ™์ด)

        • image
      1. backtick, bold๋Š” ์ขŒ ์šฐ์— space๋ฅผ ๊ผญ ๋„์›Œ์ฃผ์„ธ์š”! -> ๊ด€๋ จ ๋‚ด์šฉ์€ ์ˆ˜์ • ํ›„ ์ปค๋ฐ‹ํ–ˆ์Šต๋‹ˆ๋‹ค!
      2. ํ™˜๊ฒฝ์„ค์ • / ํŒจํ‚ค์ง€ ์„ค์น˜ ๊ฐ€์ด๋“œ์˜ pip command๋Š” ๊ผญ !pip๊ฐ€ ์•„๋‹Œ %pip๋กœ ์ˆ˜์ • ๋ถ€ํƒ๋“œ๋ฆฝ๋‹ˆ๋‹ค!

@namyoungkim ์•ˆ๋…•ํ•˜์„ธ์š”!
์ˆ˜์ •ํ•ด์•ผ๋  ๋ถ€๋ถ„ ์นœ์ ˆํ•˜๊ฒŒ ์ž‘์„ฑํ•ด์ฃผ์‹œ์–ด ๋” ๊ฐ์‚ฌ๋“œ๋ฆฝ๋‹ˆ๋‹ค.
์ฝ”๋ฉ˜ํŠธ ์ฃผ์‹  ๋ถ€๋ถ„๋“ค ์ˆ˜์ •ํ•˜์—ฌ pushํ•˜์˜€์Šต๋‹ˆ๋‹ค.

[Title] 05-Qdrant
[Version] initial
[Language] ENG
[Package] langsmith, langchain_openai, langchain_qdrant, qdrant_client, langchain_core, fastembed

Langchain and Qdrant VectorStore Tutorial
- A tutorial on using Langchain's `langchain_qdrant` class to work with `Qdrant vector store`.
@namyoungkim
Copy link
Contributor

namyoungkim commented Jan 16, 2025

๐Ÿ–ฅ๏ธ OS: Mac
โœ… Checklist

  • Template: Tutorials follows the required template.
  • Table of Contents(TOC) Links: All Table of Contents links work. ((Yes/No)
  • Image: Image filenames follow guidelines.
  • *Imports: All import statements use the latest versions. Ensure "langchain-teddynote" is not used.
  • Code Execution: Code runs without errors.
  • Comments:
    • ์‹คํ–‰์€ ์ •์ƒ์ ์œผ๋กœ ๋˜๋Š” ๊ฒƒ์„ ํ™•์ธํ–ˆ์Šต๋‹ˆ๋‹ค.
    • ๋‹ค๋งŒ, ์ €ํฌ vectorstore ๊ฐœ๋ฐœ ์‹œ ํŒ€ ๋ฏธํŒ…์—์„œ ์ •ํ•ด์ง„ ๊ฒƒ ์ค‘ ํ…์ŠคํŠธ ๋ฐ์ดํ„ฐ๊ฐ€ ๋ฐ˜์˜๋˜์ง€ ์•Š์€ ๊ฒƒ ๊ฐ™์•„์š”!
      • ํ…์ŠคํŠธ ๋ฐ์ดํ„ฐ๋Š” ./data/the_little_prince.txt ์–ด๋ฆฐ์™•์ž๋ฅผ ์‚ฌ์šฉํ•˜๊ธฐ๋กœ ํ–ˆ์—ˆ๊ฑฐ๋“ ์š”

์œ„ ๋‚ด์šฉ ํ™•์ธ ๋ถ€ํƒ๋“œ๋ฆด๊ฒŒ์š”~!
@hj0302

์ž‘์„ฑํ•˜์‹œ๋ผ ์ˆ˜๊ณ ํ•˜์…จ์Šต๋‹ˆ๋‹ค. ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค! ๐Ÿ™‡๐Ÿปโ€โ™‚๏ธ

Copy link
Contributor

@hellohotkey hellohotkey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Review Checklist]

  • Review OS:

    • Windows / Mac / Linux (Windows)
  • Template Rule ์ค€์ˆ˜ ์—ฌ๋ถ€:

    • Template Rule ๊ฐ€์ด๋“œ๋ฅผ ์ค€์ˆ˜ํ•˜์˜€๋Š”๊ฐ€? (Check ํ‘œ๊ธฐ)
  • Table of Contents ๋งํฌ ํ™•์ธ:

    • Table of Contents์˜ ๋งํฌ๊ฐ€ ์›ํ™œํ•˜๊ฒŒ ๋™์ž‘ํ•˜๋Š”์ง€ ํ™•์ธํ•˜์˜€๋Š”๊ฐ€? (Check ํ‘œ๊ธฐ)
  • ์ด๋ฏธ์ง€ ํŒŒ์ผ๋ช… ๊ฒ€ํ† :

    • ์ด๋ฏธ์ง€๊ฐ€ ํฌํ•จ๋˜์–ด ์žˆ๋‹ค๋ฉด, ์ด๋ฏธ์ง€์˜ ํŒŒ์ผ๋ช…์ด ๊ฐ€์ด๋“œ๋ฅผ ์ค€์ˆ˜ํ•˜์˜€๋Š”๊ฐ€? (Check ํ‘œ๊ธฐ)
  • ์ตœ์‹  import ๋ฐฉ์‹ ์‚ฌ์šฉ ์—ฌ๋ถ€:

    • import ๊ตฌ๋ฌธ์ด ์˜ˆ์ „ legacy ๋ฐฉ์‹์ด ์•„๋‹Œ ์ตœ์‹  ๋ฒ„์ „์„ ๋”ฐ๋ฅด๋Š”๊ฐ€? (Check ํ‘œ๊ธฐ)
  • ์ฝ”๋“œ ๋™์ž‘ ํ™•์ธ:

    • ๋ชจ๋“  ์ฝ”๋“œ๊ฐ€ ์˜ค๋ฅ˜ ์—†์ด ๋™์ž‘ํ•˜๋Š”๊ฐ€? (Check ํ‘œ๊ธฐ)
    • Warning ๋ฐœ์ƒ ์‹œ ์ฝ”๋ฉ˜ํŠธ์— ์ ์–ด์ฃผ์„ธ์š”.
  • ์ œ์ถœ ํŒŒ์ผ ํ™•์ธ:

    • ๊ผญ ํ•„์š”ํ•œ ํŒŒ์ผ๋“ค๋งŒ ์ œ์ถœ๋˜์—ˆ๋Š”๊ฐ€?
      • ํŠœํ† ๋ฆฌ์–ผ ์™ธ ์„ค์ • ํŒŒ์ผ์ด๋‚˜ ๋‹ค๋ฅธ ๋ถ„์ด ์ž‘์—…ํ•œ ํŒŒ์ผ์ด ํฌํ•จ๋˜์—ˆ๋Š”์ง€ Files Changed์—์„œ ํ™•์ธ ๋ถ€ํƒ๋“œ๋ฆฝ๋‹ˆ๋‹ค. (Check ํ‘œ๊ธฐ)
  • ๊ธฐํƒ€ ์˜๊ฒฌ:
    "ํŠน์ด์‚ฌํ•ญ ์—†์Šต๋‹ˆ๋‹ค."

"์ฝ”๋“œ์˜ ์ „๋ฐ˜์ ์ธ ๊ตฌ์กฐ๊ฐ€ ๊น”๋”ํ•˜์ง€๋งŒ, ํ•จ์ˆ˜ ์ด๋ฆ„์ด ์กฐ๊ธˆ ๋” ๋ช…ํ™•ํ•˜๊ฒŒ ์ž‘์„ฑ๋˜๋ฉด ๊ฐ€๋…์„ฑ์ด ๋”์šฑ ํ–ฅ์ƒ๋  ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค. ์˜ˆ: process() ๋Œ€์‹  process_and_validate() ์‚ฌ์šฉ."

"์ฃผ์„์ด ๋น„๊ต์  ์ ์€ ํŽธ์ด๋ผ ์ฝ”๋“œ์˜ ์˜๋„๋ฅผ ํŒŒ์•…ํ•˜๊ธฐ ์–ด๋ ค์šด ๋ถ€๋ถ„์ด ์žˆ์—ˆ์Šต๋‹ˆ๋‹ค. ์ฃผ์š” ํ•จ์ˆ˜์™€ ๋ณต์žกํ•œ ๋กœ์ง์— ์ถ”๊ฐ€์ ์ธ ์„ค๋ช…์„ ์ž‘์„ฑํ•ด ์ฃผ์‹œ๋ฉด ์ข‹๊ฒ ์Šต๋‹ˆ๋‹ค."

"ํ˜„์žฌ ๋ฐ˜๋ณต๋ฌธ ๋‚ด์—์„œ ๋™์ผํ•œ ๋ฐ์ดํ„ฐ๋ฅผ ์—ฌ๋Ÿฌ ๋ฒˆ ํ˜ธ์ถœํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. ํ•ด๋‹น ๋ฐ์ดํ„ฐ๋ฅผ ๋ฐ˜๋ณต๋ฌธ ์™ธ๋ถ€๋กœ ๋นผ๋‚ด ์บ์‹ฑํ•˜๋ฉด ์„ฑ๋Šฅ ์ตœ์ ํ™”์— ๋„์›€์ด ๋  ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค."


์•ˆ๋…•ํ•˜์„ธ์š” ๋ฌธํ˜„์ข…๋‹˜,
Qdrant ํŠœํ† ๋ฆฌ์–ผ์„ ๊ฒ€ํ† ํ•œ ๊ฒฐ๊ณผ, ๋‹ค์Œ๊ณผ ๊ฐ™์€ ์ฃผ์š” ์ˆ˜์ •์‚ฌํ•ญ์ด ํ•„์š”ํ•ด๋ณด์ž…๋‹ˆ๋‹ค.

  1. ํ˜„์žฌ [Note] ํ‘œ์‹œ๊ฐ€ ์ผ๋ฐ˜ ํ…์ŠคํŠธ๋กœ ๋˜์–ด ์žˆ์œผ๋‚˜, ๊ฐ€์ด๋“œ๋ผ์ธ์— ๋”ฐ๋ผ **[Note]**๋กœ ๋ณผ๋“œ ์ฒ˜๋ฆฌ๊ฐ€ ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค.

2.ํ˜„์žฌ ์ด๋ฏธ์ง€ ํŒŒ์ผ๋“ค์ด 'data' ํด๋”์— ์œ„์น˜ํ•ด ์žˆ์œผ๋‚˜, ๊ฐ€์ด๋“œ๋ผ์ธ์— ๋”ฐ๋ผ 'assets' ํด๋”๋กœ ์ด๋™ํ•˜๊ณ  ๋งˆํฌ๋‹ค์šด ๋ฌธ๋ฒ•์œผ๋กœ ์ฐธ์กฐํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.
image

3.'Dense Vector Search', 'Sparse Vector Search', 'Hybrid Search' ์„น์…˜์€ ๋ชฉ์ฐจ์— ์—†๋Š”๋ฐ, 'Multimodal Search'๊ณผ ๋‹ค๋ฅธ ๋ ˆ๋ฒจ์ผ๊นŒ์š”?

ํŠœํ† ๋ฆฌ์–ผ ์ž‘์„ฑํ•˜์‹œ๋А๋ผ ๊ณ ์ƒ ๋งŽ์œผ์…จ์Šต๋‹ˆ๋‹ค!

[Title] 05-Qdrant
[Version] fix
[Language] ENG
[Package] langsmith, langchain_openai, langchain_qdrant, qdrant_client, langchain_core, fastembed

Langchain and Qdrant VectorStore Tutorial
- A tutorial on using Langchain's `langchain_qdrant` class to work with `Qdrant vector store`.
@hj0302
Copy link
Contributor Author

hj0302 commented Jan 18, 2025

[Review Checklist]

  • Review OS:

    • Windows / Mac / Linux (Windows)
  • Template Rule ์ค€์ˆ˜ ์—ฌ๋ถ€:

    • Template Rule ๊ฐ€์ด๋“œ๋ฅผ ์ค€์ˆ˜ํ•˜์˜€๋Š”๊ฐ€? (Check ํ‘œ๊ธฐ)
  • Table of Contents ๋งํฌ ํ™•์ธ:

    • Table of Contents์˜ ๋งํฌ๊ฐ€ ์›ํ™œํ•˜๊ฒŒ ๋™์ž‘ํ•˜๋Š”์ง€ ํ™•์ธํ•˜์˜€๋Š”๊ฐ€? (Check ํ‘œ๊ธฐ)
  • ์ด๋ฏธ์ง€ ํŒŒ์ผ๋ช… ๊ฒ€ํ† :

    • ์ด๋ฏธ์ง€๊ฐ€ ํฌํ•จ๋˜์–ด ์žˆ๋‹ค๋ฉด, ์ด๋ฏธ์ง€์˜ ํŒŒ์ผ๋ช…์ด ๊ฐ€์ด๋“œ๋ฅผ ์ค€์ˆ˜ํ•˜์˜€๋Š”๊ฐ€? (Check ํ‘œ๊ธฐ)
  • ์ตœ์‹  import ๋ฐฉ์‹ ์‚ฌ์šฉ ์—ฌ๋ถ€:

    • import ๊ตฌ๋ฌธ์ด ์˜ˆ์ „ legacy ๋ฐฉ์‹์ด ์•„๋‹Œ ์ตœ์‹  ๋ฒ„์ „์„ ๋”ฐ๋ฅด๋Š”๊ฐ€? (Check ํ‘œ๊ธฐ)
  • ์ฝ”๋“œ ๋™์ž‘ ํ™•์ธ:

    • ๋ชจ๋“  ์ฝ”๋“œ๊ฐ€ ์˜ค๋ฅ˜ ์—†์ด ๋™์ž‘ํ•˜๋Š”๊ฐ€? (Check ํ‘œ๊ธฐ)
    • Warning ๋ฐœ์ƒ ์‹œ ์ฝ”๋ฉ˜ํŠธ์— ์ ์–ด์ฃผ์„ธ์š”.
  • ์ œ์ถœ ํŒŒ์ผ ํ™•์ธ:

    • ๊ผญ ํ•„์š”ํ•œ ํŒŒ์ผ๋“ค๋งŒ ์ œ์ถœ๋˜์—ˆ๋Š”๊ฐ€?

      • ํŠœํ† ๋ฆฌ์–ผ ์™ธ ์„ค์ • ํŒŒ์ผ์ด๋‚˜ ๋‹ค๋ฅธ ๋ถ„์ด ์ž‘์—…ํ•œ ํŒŒ์ผ์ด ํฌํ•จ๋˜์—ˆ๋Š”์ง€ Files Changed์—์„œ ํ™•์ธ ๋ถ€ํƒ๋“œ๋ฆฝ๋‹ˆ๋‹ค. (Check ํ‘œ๊ธฐ)
  • ๊ธฐํƒ€ ์˜๊ฒฌ:
    "ํŠน์ด์‚ฌํ•ญ ์—†์Šต๋‹ˆ๋‹ค."

"์ฝ”๋“œ์˜ ์ „๋ฐ˜์ ์ธ ๊ตฌ์กฐ๊ฐ€ ๊น”๋”ํ•˜์ง€๋งŒ, ํ•จ์ˆ˜ ์ด๋ฆ„์ด ์กฐ๊ธˆ ๋” ๋ช…ํ™•ํ•˜๊ฒŒ ์ž‘์„ฑ๋˜๋ฉด ๊ฐ€๋…์„ฑ์ด ๋”์šฑ ํ–ฅ์ƒ๋  ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค. ์˜ˆ: process() ๋Œ€์‹  process_and_validate() ์‚ฌ์šฉ."

"์ฃผ์„์ด ๋น„๊ต์  ์ ์€ ํŽธ์ด๋ผ ์ฝ”๋“œ์˜ ์˜๋„๋ฅผ ํŒŒ์•…ํ•˜๊ธฐ ์–ด๋ ค์šด ๋ถ€๋ถ„์ด ์žˆ์—ˆ์Šต๋‹ˆ๋‹ค. ์ฃผ์š” ํ•จ์ˆ˜์™€ ๋ณต์žกํ•œ ๋กœ์ง์— ์ถ”๊ฐ€์ ์ธ ์„ค๋ช…์„ ์ž‘์„ฑํ•ด ์ฃผ์‹œ๋ฉด ์ข‹๊ฒ ์Šต๋‹ˆ๋‹ค."

"ํ˜„์žฌ ๋ฐ˜๋ณต๋ฌธ ๋‚ด์—์„œ ๋™์ผํ•œ ๋ฐ์ดํ„ฐ๋ฅผ ์—ฌ๋Ÿฌ ๋ฒˆ ํ˜ธ์ถœํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. ํ•ด๋‹น ๋ฐ์ดํ„ฐ๋ฅผ ๋ฐ˜๋ณต๋ฌธ ์™ธ๋ถ€๋กœ ๋นผ๋‚ด ์บ์‹ฑํ•˜๋ฉด ์„ฑ๋Šฅ ์ตœ์ ํ™”์— ๋„์›€์ด ๋  ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค."

์•ˆ๋…•ํ•˜์„ธ์š” ๋ฌธํ˜„์ข…๋‹˜, Qdrant ํŠœํ† ๋ฆฌ์–ผ์„ ๊ฒ€ํ† ํ•œ ๊ฒฐ๊ณผ, ๋‹ค์Œ๊ณผ ๊ฐ™์€ ์ฃผ์š” ์ˆ˜์ •์‚ฌํ•ญ์ด ํ•„์š”ํ•ด๋ณด์ž…๋‹ˆ๋‹ค.

  1. ํ˜„์žฌ [Note] ํ‘œ์‹œ๊ฐ€ ์ผ๋ฐ˜ ํ…์ŠคํŠธ๋กœ ๋˜์–ด ์žˆ์œผ๋‚˜, ๊ฐ€์ด๋“œ๋ผ์ธ์— ๋”ฐ๋ผ **[Note]**๋กœ ๋ณผ๋“œ ์ฒ˜๋ฆฌ๊ฐ€ ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค.

2.ํ˜„์žฌ ์ด๋ฏธ์ง€ ํŒŒ์ผ๋“ค์ด 'data' ํด๋”์— ์œ„์น˜ํ•ด ์žˆ์œผ๋‚˜, ๊ฐ€์ด๋“œ๋ผ์ธ์— ๋”ฐ๋ผ 'assets' ํด๋”๋กœ ์ด๋™ํ•˜๊ณ  ๋งˆํฌ๋‹ค์šด ๋ฌธ๋ฒ•์œผ๋กœ ์ฐธ์กฐํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. image

3.'Dense Vector Search', 'Sparse Vector Search', 'Hybrid Search' ์„น์…˜์€ ๋ชฉ์ฐจ์— ์—†๋Š”๋ฐ, 'Multimodal Search'๊ณผ ๋‹ค๋ฅธ ๋ ˆ๋ฒจ์ผ๊นŒ์š”?

ํŠœํ† ๋ฆฌ์–ผ ์ž‘์„ฑํ•˜์‹œ๋А๋ผ ๊ณ ์ƒ ๋งŽ์œผ์…จ์Šต๋‹ˆ๋‹ค!

์•ˆ๋…•ํ•˜์„ธ์š”! ๋ฆฌ๋ทฐ์ž‘์„ฑํ•ด์ฃผ์…”์„œ ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค.

  1. ํ˜„์žฌ [Note] ํ‘œ์‹œ๊ฐ€ ์ผ๋ฐ˜ ํ…์ŠคํŠธ๋กœ ๋˜์–ด ์žˆ์œผ๋‚˜, ๊ฐ€์ด๋“œ๋ผ์ธ์— ๋”ฐ๋ผ **[Note]**๋กœ ๋ณผ๋“œ ์ฒ˜๋ฆฌ๊ฐ€ ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค.
    => ์ˆ˜์ •์™„๋ฃŒํ•˜์˜€์Šต๋‹ˆ๋‹ค.
    2.ํ˜„์žฌ ์ด๋ฏธ์ง€ ํŒŒ์ผ๋“ค์ด 'data' ํด๋”์— ์œ„์น˜ํ•ด ์žˆ์œผ๋‚˜, ๊ฐ€์ด๋“œ๋ผ์ธ์— ๋”ฐ๋ผ 'assets' ํด๋”๋กœ ์ด๋™ํ•˜๊ณ  ๋งˆํฌ๋‹ค์šด ๋ฌธ๋ฒ•์œผ๋กœ ์ฐธ์กฐํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. !
    => ๋ฉ€ํ‹ฐ๋ชจ๋‹ฌ๋ถ„์„์€ ์ฃผํ”ผํ„ฐ๋…ธํŠธ๋ถ์— ๋”ฐ๋กœ ๋งŒ๋“ค๊ธฐ์œ„ํ•ด ํ•ด๋‹น ๋…ธํŠธ๋ถ์—์„œ ์ œ์™ธ๋˜์–ด ์ด๋ฏธ์ง€ํŒŒ์ผ์€ ์‚ญ์ œํ•˜์˜€์Šต๋‹ˆ๋‹ค.
  2. 'Dense Vector Search', 'Sparse Vector Search', 'Hybrid Search' ์„น์…˜์€ ๋ชฉ์ฐจ์— ์—†๋Š”๋ฐ, 'Multimodal Search'๊ณผ ๋‹ค๋ฅธ ๋ ˆ๋ฒจ์ผ๊นŒ์š”?
    => 'MultiModal'์€ header2๋กœ ๋ชฉ์ฐจ๋ฅผ ์ง„ํ–‰ํ•˜๋ ค๊ณ  ํ–ˆ์—ˆ๋Š”๋ฐ ์ œ์™ธํ•˜์˜€์Šต๋‹ˆ๋‹ค.

๐Ÿ–ฅ๏ธ OS: Mac โœ… Checklist

  • Template: Tutorials follows the required template.

  • Table of Contents(TOC) Links: All Table of Contents links work. ((Yes/No)

  • Image: Image filenames follow guidelines.

  • *Imports: All import statements use the latest versions. Ensure "langchain-teddynote" is not used.

  • Code Execution: Code runs without errors.

  • Comments:

    • ์‹คํ–‰์€ ์ •์ƒ์ ์œผ๋กœ ๋˜๋Š” ๊ฒƒ์„ ํ™•์ธํ–ˆ์Šต๋‹ˆ๋‹ค.

    • ๋‹ค๋งŒ, ์ €ํฌ vectorstore ๊ฐœ๋ฐœ ์‹œ ํŒ€ ๋ฏธํŒ…์—์„œ ์ •ํ•ด์ง„ ๊ฒƒ ์ค‘ ํ…์ŠคํŠธ ๋ฐ์ดํ„ฐ๊ฐ€ ๋ฐ˜์˜๋˜์ง€ ์•Š์€ ๊ฒƒ ๊ฐ™์•„์š”!

      • ํ…์ŠคํŠธ ๋ฐ์ดํ„ฐ๋Š” ./data/the_little_prince.txt ์–ด๋ฆฐ์™•์ž๋ฅผ ์‚ฌ์šฉํ•˜๊ธฐ๋กœ ํ–ˆ์—ˆ๊ฑฐ๋“ ์š”

์œ„ ๋‚ด์šฉ ํ™•์ธ ๋ถ€ํƒ๋“œ๋ฆด๊ฒŒ์š”~! @hj0302

์ž‘์„ฑํ•˜์‹œ๋ผ ์ˆ˜๊ณ ํ•˜์…จ์Šต๋‹ˆ๋‹ค. ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค! ๐Ÿ™‡๐Ÿปโ€โ™‚๏ธ

์•ˆ๋…•ํ•˜์„ธ์š”! ๋ฆฌ๋ทฐํ•ด์ฃผ์…”์„œ ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค.
./data/the_little_prince.txt ์–ด๋ฆฐ์™•์ž ํ…์ŠคํŠธ ๋ฐ์ดํ„ฐ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ๋‹ค์‹œ ์ปค๋ฐ‹ํ•˜์˜€์Šต๋‹ˆ๋‹ค!
์ถ”๊ฐ€๋กœ ๋ฉ€ํ‹ฐ๋ชจ๋‹ฌ๋ถ„์„์€ ์ด๋ฒˆ ๋…ธํŠธ๋ถ์—์„œ ์ œ์™ธ๋˜์–ด ์ด๋ฏธ์ง€ ๋ฐ์ดํ„ฐ๋Š” ์‚ญ์ œํ•˜์˜€์Šต๋‹ˆ๋‹ค.

@hj0302
Copy link
Contributor Author

hj0302 commented Jan 18, 2025

[Review Checklist]

  • Review OS:

    • Windows / Mac / Linux (Windows)
  • Template Rule ์ค€์ˆ˜ ์—ฌ๋ถ€:

    • Template Rule ๊ฐ€์ด๋“œ๋ฅผ ์ค€์ˆ˜ํ•˜์˜€๋Š”๊ฐ€? (Check ํ‘œ๊ธฐ)
  • Table of Contents ๋งํฌ ํ™•์ธ:

    • Table of Contents์˜ ๋งํฌ๊ฐ€ ์›ํ™œํ•˜๊ฒŒ ๋™์ž‘ํ•˜๋Š”์ง€ ํ™•์ธํ•˜์˜€๋Š”๊ฐ€? (Check ํ‘œ๊ธฐ)
  • ์ด๋ฏธ์ง€ ํŒŒ์ผ๋ช… ๊ฒ€ํ† :

    • ์ด๋ฏธ์ง€๊ฐ€ ํฌํ•จ๋˜์–ด ์žˆ๋‹ค๋ฉด, ์ด๋ฏธ์ง€์˜ ํŒŒ์ผ๋ช…์ด ๊ฐ€์ด๋“œ๋ฅผ ์ค€์ˆ˜ํ•˜์˜€๋Š”๊ฐ€? (Check ํ‘œ๊ธฐ)
  • ์ตœ์‹  import ๋ฐฉ์‹ ์‚ฌ์šฉ ์—ฌ๋ถ€:

    • import ๊ตฌ๋ฌธ์ด ์˜ˆ์ „ legacy ๋ฐฉ์‹์ด ์•„๋‹Œ ์ตœ์‹  ๋ฒ„์ „์„ ๋”ฐ๋ฅด๋Š”๊ฐ€? (Check ํ‘œ๊ธฐ)
  • ์ฝ”๋“œ ๋™์ž‘ ํ™•์ธ:

    • ๋ชจ๋“  ์ฝ”๋“œ๊ฐ€ ์˜ค๋ฅ˜ ์—†์ด ๋™์ž‘ํ•˜๋Š”๊ฐ€? (Check ํ‘œ๊ธฐ)
    • Warning ๋ฐœ์ƒ ์‹œ ์ฝ”๋ฉ˜ํŠธ์— ์ ์–ด์ฃผ์„ธ์š”.
  • ์ œ์ถœ ํŒŒ์ผ ํ™•์ธ:

    • ๊ผญ ํ•„์š”ํ•œ ํŒŒ์ผ๋“ค๋งŒ ์ œ์ถœ๋˜์—ˆ๋Š”๊ฐ€?

      • ํŠœํ† ๋ฆฌ์–ผ ์™ธ ์„ค์ • ํŒŒ์ผ์ด๋‚˜ ๋‹ค๋ฅธ ๋ถ„์ด ์ž‘์—…ํ•œ ํŒŒ์ผ์ด ํฌํ•จ๋˜์—ˆ๋Š”์ง€ Files Changed์—์„œ ํ™•์ธ ๋ถ€ํƒ๋“œ๋ฆฝ๋‹ˆ๋‹ค. (Check ํ‘œ๊ธฐ)
  • ๊ธฐํƒ€ ์˜๊ฒฌ:
    "ํŠน์ด์‚ฌํ•ญ ์—†์Šต๋‹ˆ๋‹ค."

"์ฝ”๋“œ์˜ ์ „๋ฐ˜์ ์ธ ๊ตฌ์กฐ๊ฐ€ ๊น”๋”ํ•˜์ง€๋งŒ, ํ•จ์ˆ˜ ์ด๋ฆ„์ด ์กฐ๊ธˆ ๋” ๋ช…ํ™•ํ•˜๊ฒŒ ์ž‘์„ฑ๋˜๋ฉด ๊ฐ€๋…์„ฑ์ด ๋”์šฑ ํ–ฅ์ƒ๋  ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค. ์˜ˆ: process() ๋Œ€์‹  process_and_validate() ์‚ฌ์šฉ."

"์ฃผ์„์ด ๋น„๊ต์  ์ ์€ ํŽธ์ด๋ผ ์ฝ”๋“œ์˜ ์˜๋„๋ฅผ ํŒŒ์•…ํ•˜๊ธฐ ์–ด๋ ค์šด ๋ถ€๋ถ„์ด ์žˆ์—ˆ์Šต๋‹ˆ๋‹ค. ์ฃผ์š” ํ•จ์ˆ˜์™€ ๋ณต์žกํ•œ ๋กœ์ง์— ์ถ”๊ฐ€์ ์ธ ์„ค๋ช…์„ ์ž‘์„ฑํ•ด ์ฃผ์‹œ๋ฉด ์ข‹๊ฒ ์Šต๋‹ˆ๋‹ค."

"ํ˜„์žฌ ๋ฐ˜๋ณต๋ฌธ ๋‚ด์—์„œ ๋™์ผํ•œ ๋ฐ์ดํ„ฐ๋ฅผ ์—ฌ๋Ÿฌ ๋ฒˆ ํ˜ธ์ถœํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. ํ•ด๋‹น ๋ฐ์ดํ„ฐ๋ฅผ ๋ฐ˜๋ณต๋ฌธ ์™ธ๋ถ€๋กœ ๋นผ๋‚ด ์บ์‹ฑํ•˜๋ฉด ์„ฑ๋Šฅ ์ตœ์ ํ™”์— ๋„์›€์ด ๋  ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค."

์•ˆ๋…•ํ•˜์„ธ์š” ๋ฌธํ˜„์ข…๋‹˜, Qdrant ํŠœํ† ๋ฆฌ์–ผ์„ ๊ฒ€ํ† ํ•œ ๊ฒฐ๊ณผ, ๋‹ค์Œ๊ณผ ๊ฐ™์€ ์ฃผ์š” ์ˆ˜์ •์‚ฌํ•ญ์ด ํ•„์š”ํ•ด๋ณด์ž…๋‹ˆ๋‹ค.

  1. ํ˜„์žฌ [Note] ํ‘œ์‹œ๊ฐ€ ์ผ๋ฐ˜ ํ…์ŠคํŠธ๋กœ ๋˜์–ด ์žˆ์œผ๋‚˜, ๊ฐ€์ด๋“œ๋ผ์ธ์— ๋”ฐ๋ผ **[Note]**๋กœ ๋ณผ๋“œ ์ฒ˜๋ฆฌ๊ฐ€ ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค.

2.ํ˜„์žฌ ์ด๋ฏธ์ง€ ํŒŒ์ผ๋“ค์ด 'data' ํด๋”์— ์œ„์น˜ํ•ด ์žˆ์œผ๋‚˜, ๊ฐ€์ด๋“œ๋ผ์ธ์— ๋”ฐ๋ผ 'assets' ํด๋”๋กœ ์ด๋™ํ•˜๊ณ  ๋งˆํฌ๋‹ค์šด ๋ฌธ๋ฒ•์œผ๋กœ ์ฐธ์กฐํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. image

3.'Dense Vector Search', 'Sparse Vector Search', 'Hybrid Search' ์„น์…˜์€ ๋ชฉ์ฐจ์— ์—†๋Š”๋ฐ, 'Multimodal Search'๊ณผ ๋‹ค๋ฅธ ๋ ˆ๋ฒจ์ผ๊นŒ์š”?

ํŠœํ† ๋ฆฌ์–ผ ์ž‘์„ฑํ•˜์‹œ๋А๋ผ ๊ณ ์ƒ ๋งŽ์œผ์…จ์Šต๋‹ˆ๋‹ค!

์•ˆ๋…•ํ•˜์„ธ์š”! ๋ฆฌ๋ทฐ์ž‘์„ฑํ•ด์ฃผ์…”์„œ ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค.

  1. ํ˜„์žฌ [Note] ํ‘œ์‹œ๊ฐ€ ์ผ๋ฐ˜ ํ…์ŠคํŠธ๋กœ ๋˜์–ด ์žˆ์œผ๋‚˜, ๊ฐ€์ด๋“œ๋ผ์ธ์— ๋”ฐ๋ผ **[Note]**๋กœ ๋ณผ๋“œ ์ฒ˜๋ฆฌ๊ฐ€ ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค.
    => ์ˆ˜์ •์™„๋ฃŒํ•˜์˜€์Šต๋‹ˆ๋‹ค.
    2.ํ˜„์žฌ ์ด๋ฏธ์ง€ ํŒŒ์ผ๋“ค์ด 'data' ํด๋”์— ์œ„์น˜ํ•ด ์žˆ์œผ๋‚˜, ๊ฐ€์ด๋“œ๋ผ์ธ์— ๋”ฐ๋ผ 'assets' ํด๋”๋กœ ์ด๋™ํ•˜๊ณ  ๋งˆํฌ๋‹ค์šด ๋ฌธ๋ฒ•์œผ๋กœ ์ฐธ์กฐํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. !
    => ๋ฉ€ํ‹ฐ๋ชจ๋‹ฌ๋ถ„์„์€ ์ƒˆ๋กœ์šด ๋…ธํŠธ๋ถ์— ๋”ฐ๋กœ ์ž‘์„ฑํ•˜๊ธฐ ์œ„ํ•ด ํ•ด๋‹น ๋…ธํŠธ๋ถ์—์„œ ์ œ์™ธ๋˜์–ด ์ด๋ฏธ์ง€ํŒŒ์ผ์€ ์‚ญ์ œํ•˜์˜€์Šต๋‹ˆ๋‹ค.
  2. 'Dense Vector Search', 'Sparse Vector Search', 'Hybrid Search' ์„น์…˜์€ ๋ชฉ์ฐจ์— ์—†๋Š”๋ฐ, 'Multimodal Search'๊ณผ ๋‹ค๋ฅธ ๋ ˆ๋ฒจ์ผ๊นŒ์š”?
    => 'MultiModal'์€ header2๋กœ ๋ชฉ์ฐจ๋ฅผ ์ง„ํ–‰ํ•˜๋ ค๊ณ  ํ–ˆ์—ˆ๋Š”๋ฐ ์ œ์™ธํ•˜์˜€์Šต๋‹ˆ๋‹ค.

Copy link
Contributor

@namyoungkim namyoungkim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

๐Ÿ–ฅ๏ธ OS: Mac
โœ… Checklist

  • Template: Tutorials follows the required template.
  • Table of Contents(TOC) Links: All Table of Contents links work. ((Yes/No)
  • Image: Image filenames follow guidelines.
  • *Imports: All import statements use the latest versions. Ensure "langchain-teddynote" is not used.
  • Code Execution: Code runs without errors.
  • Comments:
    ์ˆ˜์ •ํ•ด์ฃผ์‹  ๋‚ด์šฉ ํ™•์ธํ–ˆ์Šต๋‹ˆ๋‹ค!
    ์ฝ”๋“œ๋ฅผ ์‹คํ–‰ํ•ด๋ณด๋ฉด, DB์— ๋ฐ์ดํ„ฐ ์ ์žฌํ•  ๋•Œ, ๋‹ค์Œ ์—๋Ÿฌ๊ฐ€ ๋œจ๋„ค์š” ๐Ÿฅฒ
image

ํƒ€์ž„ ์•„์›ƒ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ•ด์„œ ํ™•์ธํ•ด๋ณด๋‹ˆ, ๋ฌด๋ฃŒ๋กœ ์ฃผ๋Š” Qdrant ํด๋Ÿฌ์Šคํ„ฐ ์„ฑ๋Šฅ์ด ์ข‹์ง€ ์•Š์€ ๊ฒƒ ๊ฐ™๋„ค์š”.

ํ…Œ์ŠคํŠธ๋ฅผ ํ•ด๋ณด๋‹ˆ batch_size=10๋กœ ์ถ”๊ฐ€ ์˜ต์…˜๊ฐ’์„ ์ง€์ •ํ•ด์„œ ์‹คํ–‰ํ•˜๋ฉด ์‹œ๊ฐ„์ด 1๋ถ„ ์ •๋„ ๊ฑธ๋ฆฌ์ง€๋งŒ ์ •์ƒ ์ ์žฌ๋˜๋Š” ๊ฒƒ์„ ํ™•์ธํ–ˆ์Šต๋‹ˆ๋‹ค.

vector_store.add_documents(documents=split_docs, ids=uuids, batch_size=10)

์ˆ˜์ •ํ•œ ๋ถ€๋ถ„์„ ๋‹ค์Œ ๊ทธ๋ฆผ 4๊ฐœ๋กœ ์บก์ณํ•ด์„œ ์ „๋‹ฌ๋“œ๋ฆฝ๋‹ˆ๋‹ค~!

<๊ทธ๋ฆผ1>
image

<๊ทธ๋ฆผ2>
image

<๊ทธ๋ฆผ3>
image

<๊ทธ๋ฆผ4>
image

์ €๋งŒ ๋ฐœ์ƒํ•˜๋Š” ์—๋Ÿฌ์ธ์ง€ ๋ชจ๋ฅด๊ฒ ์ง€๋งŒ, ํ™•์ธํ›„ ๊ฒ€ํ† ํ•˜์‹  ํ›„ ๋ฐ˜์˜ ๋ถ€ํƒ๋“œ๋ฆฝ๋‹ˆ๋‹ค!
๊ณ ์ƒํ•˜์…จ์Šต๋‹ˆ๋‹ค. ๐Ÿ™‡๐Ÿปโ€โ™‚๏ธ

[Title] 05-Qdrant
[Version] fix
[Language] ENG
[Package] langsmith, langchain_openai, langchain_qdrant, qdrant_client, langchain_core, fastembed

Langchain and Qdrant VectorStore Tutorial
- A tutorial on using Langchain's `langchain_qdrant` class to work with `Qdrant vector store`.
@hj0302
Copy link
Contributor Author

hj0302 commented Jan 18, 2025

๐Ÿ–ฅ๏ธ OS: Mac โœ… Checklist

  • Template: Tutorials follows the required template.
  • Table of Contents(TOC) Links: All Table of Contents links work. ((Yes/No)
  • Image: Image filenames follow guidelines.
  • *Imports: All import statements use the latest versions. Ensure "langchain-teddynote" is not used.
  • Code Execution: Code runs without errors.
  • Comments:
    ์ˆ˜์ •ํ•ด์ฃผ์‹  ๋‚ด์šฉ ํ™•์ธํ–ˆ์Šต๋‹ˆ๋‹ค!
    ์ฝ”๋“œ๋ฅผ ์‹คํ–‰ํ•ด๋ณด๋ฉด, DB์— ๋ฐ์ดํ„ฐ ์ ์žฌํ•  ๋•Œ, ๋‹ค์Œ ์—๋Ÿฌ๊ฐ€ ๋œจ๋„ค์š” ๐Ÿฅฒ
image **ํƒ€์ž„ ์•„์›ƒ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ•ด์„œ ํ™•์ธํ•ด๋ณด๋‹ˆ, ๋ฌด๋ฃŒ๋กœ ์ฃผ๋Š” Qdrant ํด๋Ÿฌ์Šคํ„ฐ ์„ฑ๋Šฅ์ด ์ข‹์ง€ ์•Š์€ ๊ฒƒ ๊ฐ™๋„ค์š”.**

ํ…Œ์ŠคํŠธ๋ฅผ ํ•ด๋ณด๋‹ˆ batch_size=10๋กœ ์ถ”๊ฐ€ ์˜ต์…˜๊ฐ’์„ ์ง€์ •ํ•ด์„œ ์‹คํ–‰ํ•˜๋ฉด ์‹œ๊ฐ„์ด 1๋ถ„ ์ •๋„ ๊ฑธ๋ฆฌ์ง€๋งŒ ์ •์ƒ ์ ์žฌ๋˜๋Š” ๊ฒƒ์„ ํ™•์ธํ–ˆ์Šต๋‹ˆ๋‹ค.

vector_store.add_documents(documents=split_docs, ids=uuids, batch_size=10)

์ˆ˜์ •ํ•œ ๋ถ€๋ถ„์„ ๋‹ค์Œ ๊ทธ๋ฆผ 4๊ฐœ๋กœ ์บก์ณํ•ด์„œ ์ „๋‹ฌ๋“œ๋ฆฝ๋‹ˆ๋‹ค~!

<๊ทธ๋ฆผ1> image

<๊ทธ๋ฆผ2> image

<๊ทธ๋ฆผ3> image

<๊ทธ๋ฆผ4> image

์ €๋งŒ ๋ฐœ์ƒํ•˜๋Š” ์—๋Ÿฌ์ธ์ง€ ๋ชจ๋ฅด๊ฒ ์ง€๋งŒ, ํ™•์ธํ›„ ๊ฒ€ํ† ํ•˜์‹  ํ›„ ๋ฐ˜์˜ ๋ถ€ํƒ๋“œ๋ฆฝ๋‹ˆ๋‹ค! ๊ณ ์ƒํ•˜์…จ์Šต๋‹ˆ๋‹ค. ๐Ÿ™‡๐Ÿปโ€โ™‚๏ธ

์ œ๊ฐ€ ์‹คํ–‰ํ–ˆ์„ ๋•Œ๋Š” batch_size๊ฐ€ ์—†์–ด๋„ ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ•˜์ง€ ์•Š์•„ ๋ฌธ์ œ๋ฅผ ํ™•์ธํ•˜์ง€ ๋ชปํ–ˆ์Šต๋‹ˆ๋‹ค.
ํ˜„์žฌ ์ •ํ™•ํ•œ ์›์ธ์€ ํŒŒ์•…ํ•˜์ง€ ๋ชปํ–ˆ์ง€๋งŒ, batch_size ํŒŒ๋ผ๋ฏธํ„ฐ๋ฅผ ์ถ”๊ฐ€ํ•˜์—ฌ ๋ฐ˜์˜ํ•˜์˜€์Šต๋‹ˆ๋‹ค.

[Title] 05-Qdrant
[Version] fix
[Language] ENG
[Package] langsmith, langchain_openai, langchain_qdrant, qdrant_client, langchain_core, fastembed

Langchain and Qdrant VectorStore Tutorial
- A tutorial on using Langchain's `langchain_qdrant` class to work with `Qdrant vector store`.
@hj0302 hj0302 requested a review from sohyunwriter January 18, 2025 13:01
Copy link
Contributor

@namyoungkim namyoungkim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

๐Ÿ–ฅ๏ธ OS: Mac
โœ… Checklist

  • Template: Tutorials follows the required template.
  • Table of Contents(TOC) Links: All Table of Contents links work. ((Yes/No)
  • Image: Image filenames follow guidelines.
  • *Imports: All import statements use the latest versions. Ensure "langchain-teddynote" is not used.
  • Code Execution: Code runs without errors.
  • Comments:
    ์ˆ˜์ •ํ•ด์ฃผ์‹  ๋‚ด์šฉ ํ™•์ธํ–ˆ๊ณ  ์ฝ”๋“œ ์ •์ƒ์ ์œผ๋กœ ์‹คํ–‰๋˜๋Š” ๊ฒƒ ํ™•์ธํ–ˆ์Šต๋‹ˆ๋‹ค.

์ €๋„ ์›์ธ์„ ์กฐ๊ธˆ ๋” ๋ดค๋Š”๋ฐ์š”.
๋„คํŠธ์›Œํฌ ์†๋„๋‚˜ ํ™˜๊ฒฝ์— ์˜ํ–ฅ์„ ๋ฐ›๋Š” ๊ฒƒ ๊ฐ™๋„ค์š”. (์ €ํฌ ์ง‘ ์™€์ดํŒŒ์ด ํ™˜๊ฒฝ ๋•Œ๋ฌธ์ธ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค.)

ํด๋ผ์šฐ๋“œ DB๋ฅผ ํ™œ์šฉํ•˜๋Š” ๊ฒฝ์šฐ, ๋ฐ์ดํ„ฐ๋ฅผ ์—…๋กœ๋“œํ•  ๋•Œ, ๋„คํŠธ์›Œํฌ ํ™˜๊ฒฝ์— ๋”ฐ๋ผ์„œ ์ปค๋„ฅํŠธํƒ€์ž„์ด๋‚˜ ๋ฐฐ์น˜์‚ฌ์ด์ฆˆ ์กฐ์ ˆํ•  ์ˆ˜ ์žˆ๋„๋ก ๊ด€๋ จ ๋‚ด์šฉ๋„ ๊ฐ€์ด๋“œ๋กœ ํฌํ•จ์‹œํ‚ค๊ฑฐ๋‚˜ ์ฝ”๋“œ์— ๋ฐ˜์˜ํ•ด์•ผ ํ•  ๊ฒƒ ๊ฐ™๋‹ค๋Š” ์ƒ๊ฐ์ด ๋“ค์—ˆ์–ด์š”.
์ œ๊ฐ€ ์ž‘์„ฑํ•œ ์—˜๋ผ์Šคํ‹ฑ์„œ์น˜์—์„œ๋„ ๋™์ผํ•œ ์ด์Šˆ๊ฐ€ ์žˆ์–ด์„œ ๋ฐฉ๊ธˆ ๋ฐ˜์˜ํ–ˆ๊ฑฐ๋“ ์š”!

๊ณ ์ƒํ•˜์…จ์Šต๋‹ˆ๋‹ค~!!

Copy link
Contributor

@sohyunwriter sohyunwriter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

๐Ÿ–ฅ๏ธ OS: Win/Mac/Linux
โœ… Checklist

  • Template: Tutorials follows the required template.
  • Table of Contents(TOC) Links: All Table of Contents links work. ((Yes/No)
  • Image: Image filenames follow guidelines.
  • *Imports: All import statements use the latest versions. Ensure "langchain-teddynote" is not used.
  • Code Execution: Code runs without errors.
  • Comments: {Write freely, ํ•œ๊ตญ์–ด ๊ธฐ์ˆ  ๊ฐ€๋Šฅ}

์ •๋ง ๊ณ ์ƒ ๋งŽ์œผ์…จ์–ด์š”. ๊ธฐ๋Šฅ ๊ฐœ๋ฐœ ์™„์ „ ์งฑ์ด๋„ค์š”!!
initialization ํ•˜๋Š” ๋ถ€๋ถ„์— ๋‚˜์ค‘์— ์‹œ๊ฐ„ ๋˜์‹œ๋ฉด ์–ด๋–ค ์—ฐ๊ฒฐ ๋ฐฉ๋ฒ•์œผ๋กœ ์‚ฌ์šฉํ–ˆ๋‹ค ๋“ฑ ์—ฐ๊ฒฐ ๋ฐฉ๋ฒ• ๊ด€๋ จํ•ด์„œ ์ข€๋งŒ ๋” ์„ค๋ช… ์ถ”๊ฐ€ํ•ด์ฃผ์‹œ๋ฉด ์ข‹์„ ๊ฒƒ ๊ฐ™์•„์š”. ํฌ๊ฒŒ ์ค‘์š”ํ•œ ๋ถ€๋ถ„์€ ์•„๋‹ˆ๋‹ˆ ๋ณ‘ํ•ฉํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค.

@sohyunwriter sohyunwriter merged commit 763d6f8 into LangChain-OpenTutorial:main Jan 19, 2025
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants