당사의 호스팅 서비스를 사용하는 경우, 임베딩은 오픈소스 모델을 통해 제공되며 추가 설정이 필요하지 않습니다.
셀프호스팅 인스턴스의 경우, 지원되는 제공자를 통해 임베딩 모델을 구성해야 합니다.
구성
관리자 → 플러그인 → Discourse AI → AI 기능으로 이동합니다.
임베딩(Embeddings) 모듈을 찾아 다음을 구성합니다:
ai_embeddings_selected_model을 구성한 임베딩 정의 값으로 설정합니다.
ai_embeddings_enabled을 활성화하여 임베딩을 활성화합니다.
ai_embeddings_semantic_related_topics_enabled을 활성화하여 관련 주제 기능을 켭니다.
임베딩 모델 설정
임베딩을 활성화하기 전에 임베딩 모델을 구성해야 합니다. 관리자 → 플러그인 → Discourse AI → 임베딩으로 이동하여 새로운 임베딩 정의를 생성하세요. 다음 프리셋 중 하나를 선택할 수 있습니다:
Open AI: text-embedding-3-small 또는 text-embedding-3-large (대부분의 사이트에 권장)
Google: gemini-embedding-001
Hugging Face (셀프호스팅 추론): multilingual-e5-large (비영어 또는 다국어 사이트에 권장), bge-large-en, 또는 bge-m3
선택한 제공자를 위해 API 키(또는 AI Secret 연결)와 엔드포인트 URL을 제공해야 합니다.
추가 설정
다음 설정을 통해 관련 주제 기능을 세밀하게 조정할 수 있습니다:
ai_embeddings_semantic_related_topics: 관련 주제 섹션에 표시할 최대 주제 수 (기본값: 5)
ai_embeddings_semantic_related_include_closed_topics: 관련 결과에 폐쇄된 주제를 포함할지 여부 (기본값: true)
ai_embeddings_semantic_related_age_penalty: 새로운 콘텐츠가 선호되도록 오래된 주제에 페널티를 적용합니다 (기본값: 0.0, 범위: 0.0–2.0)
ai_embeddings_semantic_related_age_time_scale: 연령 페널티에 사용할 시간 규모(일 단위) (기본값: 365)
기술적 FAQ
관련 주제 아키텍처 다이어그램 보기
개요는 다음과 같습니다. 주제가 생성/업데이트되면 다음이 발생합니다:
sequenceDiagram
User->>Discourse: 주제 생성
Discourse-->>Embedding Microservice: 임베딩 생성
Embedding Microservice-->>Discourse:
Discourse-->>PostgreSQL: 임베딩 저장
그리고 주제 방문 시:
sequenceDiagram
User->>Discourse: 주제 방문
Discourse-->>PostgreSQL: 가장 가까운 주제 쿼리
PostgreSQL-->>Discourse:
Discourse->>User: 관련 주제 표시
관련 주제 기능은 어떻게 작동하나요?
사용자가 주제를 방문하면, Discourse는 임베딩된 표현을 기반으로 가장 의미적으로 유사한 주제를 데이터베이스에서 쿼리합니다. 이렇게 찾은 관련 주제는 사용자에게 표시되어 커뮤니티 콘텐츠에 대한 추가 탐색을 장려합니다.
주제/게시물 데이터는 어떻게 처리되나요?
Discourse 호스팅 사이트의 경우, 데이터는 우리의 안전한 가상 개인 데이터센터 내에서 처리됩니다. 셀프호스팅 사이트의 경우, 데이터 처리는 선택한 제3자 제공자에 따라 달라집니다.
임베딩 데이터는 어디에 저장되나요?
임베딩 데이터는 주제, 게시물, 사용자 등 기타 포럼 데이터와 함께 Discourse 데이터베이스에 저장됩니다.
사용 가능한 임베딩 모델은 무엇인가요?
Discourse AI는 OpenAI(text-embedding-3-small, text-embedding-3-large), Google(gemini-embedding-001), Hugging Face 호환 엔드포인트(bge-large-en, bge-m3, multilingual-e5-large), 그리고 Cloudflare Workers AI의 모델을 지원합니다. 관리자 UI를 통해 사용자 정의 임베딩 모델도 구성할 수 있습니다.
In reviewing many post in Related Topics for an English site (OpenAI) starting to notice that topics in Spanish tend to be grouped together and suspect that if they were first translated to English each post would have a different vector and thus be clustered with other post.
A side benefit of this feature for moderators is to check that the categories of the topics listed in Related Topics are correct.
As I review each new post I also check the Related Topics. This is becoming an effective way to identify topics created with the wrong category.
FYI - A related idea was noted in this feature request.
Find this topic when often needing following link which is not so easy to find so noting here.
That behavior is governed by the model, and it appears to be a know problem:
I think the OSS model we recommend for multilingual sites does a better job at this, but we still need to rollout it to more customers to validate this.
Am I missing something here or is Gemini alone not enough?
UPDATE: The instructions and error description may want to be updated to add that the ai embeddings model should also be updated to match the provider otherwise ai_embeddings_enabled can’t be enabled. The parameter description is missing Gemini as an option.
Most of those are empty. But ai embeddings discourse service api key is your OpenAI API and ai embeddings discourse service api endpoint is https://api.openai.com/v1/embeddings. Model should be text-embedding-3-large (sure, it can be small too but it has some issues).
What were your results from comparing small and large? I know there is a difference in dimensions that affects the model’s precision. The small version is 5x cheaper. Is it really unusable in the real world for topic similarity? Our forum is 99% English.
I’d be very interested in hearing more. Can you please elaborate on where all-mpnet-base-v2 sits in comparison to OpenAI models for a purely English site?
Embeddings are so cheap that price doesn’t matter — unless there is myriad posts when 0.01 cents matter in total costs.
But honestly… I didn’t see any differences. And for me, because there is chance I can’t use RAG and embeds properly, both are equal useless. i know that is badly against public opinion, but on my site that system just doesn’t find and use anything useful.
Propably it comes from OpenAI-models but I don’t have enough money to use those more professional solutions.