Ana içeriğe geç

İlk katkı için uygun işler / Good first issues

TürkRAG'e ilk katkısını yapmak isteyenler için 15 hazır iş taslağı. Ortam kurulumu için CONTRIBUTING.md dosyasına bakın. Bir işi üstlenmek için ilgili GitHub issue'ına "Bunu ben alıyorum / I'll take this" yazın, CONTRIBUTING.md sürecini izleyin ve her PR'da tek bir işe odaklanın.

Good first issues for contributors new to TürkRAG. Claim an issue by commenting "I'll take this", follow CONTRIBUTING.md, and keep one issue per PR.


1. Eksik Türkçe kısaltmalar eklenmesi / Add missing Turkish abbreviations

Issue: https://github.com/AbuzerHarunOzarslan/turkrag/issues/1

Zorluk / Difficulty: kolay / easy · Etiketler / Labels: good first issue, text

Ne yapılacak?
src/turkrag/text/data/abbreviations.txt dosyasına "Yön.", "Gnl.", "Kom.", "Üniv.", "Bşk.Yrd." gibi yaygın Türkçe kısaltmaları uygun bölümlere ([nonfinal] / [final]) ekleyin. Küçük harf, noktasız formatta yazılmalıdır.

Hangi dosyalar? - src/turkrag/text/data/abbreviations.txt

Nasıl test edilir? - tests/text/test_sentences.py içindeki CASES listesine yeni (text, expected_sentences) tuple'ları ekleyin (örn. ("Yön. Kurulu toplandı.", ["Yön. Kurulu toplandı."])). Noktalı kısaltmalar iç noktalarıyla yazılır: bşk.yrd. - uv run pytest tests/text/test_sentences.py

Kabul ölçütleri / Acceptance criteria: - [ ] Yeni kısaltmalar abbreviations.txt'te doğru bölümde yer alıyor - [ ] Test case'leri geçiyor - [ ] uv run pytest / uv run ruff check . / uv run mypy temiz

EN: Add common Turkish abbreviations to the abbreviation dictionary and extend sentence-splitter tests.


2. Türkçe stopword listesi paketlenmesi / Ship a Turkish stopword list

Issue: https://github.com/AbuzerHarunOzarslan/turkrag/issues/2

Zorluk / Difficulty: kolay / easy · Etiketler / Labels: good first issue, retrieval

Ne yapılacak?
src/turkrag/text/data/stopwords.txt (yeni) dosyası oluşturun, satır başına bir stopword (küçük harf). turkrag.text modülüne load_stopwords() fonksiyonu ekleyin ki BM25Retriever(texts, stopwords=load_stopwords()) şeklinde kullanılabilsin.

Hangi dosyalar? - src/turkrag/text/data/stopwords.txt (yeni) - src/turkrag/text/stopwords.py (yeni, load_stopwords(); yükleme için src/turkrag/text/abbreviations.py içindeki load_abbreviations() örnek alınabilir) - src/turkrag/text/__init__.py (load_stopwords dışa aktarımı)

Nasıl test edilir? - tests/text/test_stopwords.py (yeni): assert "ve" in load_stopwords() ve assert "kitap" not in load_stopwords(). - tests/retrieval/test_bm25.py: BM25Retriever(["ve ile elma", "armut"], stopwords=load_stopwords()).search("ve ile") == []. - uv run pytest tests/text tests/retrieval/test_bm25.py

Kabul ölçütleri / Acceptance criteria: - [ ] stopwords.txt ve load_stopwords() mevcut - [ ] BM25 testinde stopword'ler filtreleniyor - [ ] uv run pytest / uv run ruff check . / uv run mypy temiz

EN: Add a Turkish stopword list file and a loader function, usable directly in BM25Retriever.


3. Yapışık cümleleri ayırma seçeneği / Optional splitting of glued sentences

Issue: https://github.com/AbuzerHarunOzarslan/turkrag/issues/3

Zorluk / Difficulty: orta / medium · Etiketler / Labels: good first issue, text

Ne yapılacak?
SentenceSplitter sınıfına split_glued=False parametresi ekleyin. True iken "geldi.Sonra" gibi boşluksuz sınırları ayırsın; URL'ler (http://site.com), ondalık sayılar (3.5), tarihler (15.07.2016) KORUNSUN. Mevcut davranış varsayılan olarak bozulmamalı.

Hangi dosyalar? - src/turkrag/text/sentences.py

Nasıl test edilir? - tests/text/test_sentences.py'ye split_glued=True ile çalışan case'ler ekleyin: "geldi.Sonra gitti." → ["geldi.", "Sonra gitti."], "site.com adresi." → ["site.com adresi."], "Fiyat 3.5 TL." → ["Fiyat 3.5 TL."]. - uv run pytest tests/text/test_sentences.py

Kabul ölçütleri / Acceptance criteria: - [ ] split_glued parametresi eklendi, varsayılan False - [ ] Yapışık cümleler ayrılıyor, URL/ondalık/tarih korunuyor - [ ] uv run pytest / uv run ruff check . / uv run mypy temiz

EN: Add an opt-in flag to split glued sentences while preserving URLs, decimals, and dates.


4. MarkdownHeaderChunker eklenmesi / Add MarkdownHeaderChunker

Issue: https://github.com/AbuzerHarunOzarslan/turkrag/issues/4

Zorluk / Difficulty: orta / medium · Etiketler / Labels: good first issue, chunking

Ne yapılacak?
turkrag.chunking.Chunker alt sınıfı MarkdownHeaderChunker yazın, @register_chunker("markdown") ile kaydedin. Markdown'ı # başlıklarında bölün, heading path'i (## A > ### B) Chunk.metadata["headings"] alanına yazın, içeriği cümle paketleme (_packing.pack) ile birleştirin.

Hangi dosyalar? - src/turkrag/chunking/markdown_header.py (yeni) - src/turkrag/chunking/__init__.py (export)

Nasıl test edilir? - tests/chunking/test_chunkers.py içindeki CONFIGS listesine MarkdownHeaderChunker(max_chars=300) örneğini ekleyin (ortak sözleşme testleri otomatik çalışır). - Örnek: "# Başlık\nİçerik.\n## Alt\nDaha fazla." → iki chunk, metadata'da headings doğru. - uv run pytest tests/chunking/test_chunkers.py

Kabul ölçütleri / Acceptance criteria: - [ ] Chunker kayıtlı ve contract testleri geçiyor - [ ] Heading path metadata'da doğru - [ ] uv run pytest / uv run ruff check . / uv run mypy temiz

EN: Implement a Markdown-aware chunker that splits on headings and preserves heading hierarchy in metadata.


5. Chunker'lar için length_function parametresi / length_function parameter for chunkers

Issue: https://github.com/AbuzerHarunOzarslan/turkrag/issues/5

Zorluk / Difficulty: orta / medium · Etiketler / Labels: good first issue, chunking

Ne yapılacak?
SentenceChunker ve ParagraphChunker sınıflarına length_function: Callable[[str], int] = len parametresi ekleyin. Paketleme (_packing.pack) bu fonksiyonu span_length yerine kullanacak şekilde uyarlayın (karakter sayısı yerine token sayısı için).

Hangi dosyalar? - src/turkrag/chunking/sentence.py - src/turkrag/chunking/paragraph.py - src/turkrag/chunking/_packing.py (pack fonksiyonu güncelleme)

Nasıl test edilir? - tests/chunking/test_chunkers.py'ye length_function=lambda s: len(s.split()) ile kelime-sayım testi ekleyin. - uv run pytest tests/chunking/test_chunkers.py

Kabul ölçütleri / Acceptance criteria: - [ ] Parametre eklendi, varsayılan len (geriye uyumlu) - [ ] Özel length function ile paketleme çalışıyor - [ ] uv run pytest / uv run ruff check . / uv run mypy temiz

EN: Allow chunkers to limit chunks by a custom length function (e.g., token count) instead of characters.


6. SemanticChunker eklenmesi / Add SemanticChunker

Issue: https://github.com/AbuzerHarunOzarslan/turkrag/issues/6

Zorluk / Difficulty: orta / medium · Etiketler / Labels: good first issue, chunking

Ne yapılacak?
SemanticChunker yazın: cümle embedding'lerini hesaplasın, ardışık cümleler arasındaki kosinüs benzerliği bir eşiğin altına düştüğünde yeni chunk başlasın. Herhangi bir Embedder protocol'ünü (embed_documents, embed_query) kabul etsin. Testlerde TrigramEmbedder kullanın.

Hangi dosyalar? - src/turkrag/chunking/semantic.py (yeni) - src/turkrag/chunking/__init__.py (export)

Nasıl test edilir? - tests/chunking/test_chunkers.py içindeki CONFIGS listesine SemanticChunker(embedder=TrigramEmbedder(), threshold=0.5) ekleyin (TrigramEmbedder: from ..retrieval.conftest import TrigramEmbedder). - Basit metin: "Cümle bir. Cümle iki. Tamamen farklı konu." → eşik uygunse 2 chunk. - uv run pytest tests/chunking/test_chunkers.py

Kabul ölçütleri / Acceptance criteria: - [ ] Chunker kayıtlı, Embedder protocol ile çalışıyor - [ ] Benzerlik eşiği chunk sınırlarını belirliyor - [ ] uv run pytest / uv run ruff check . / uv run mypy temiz

EN: Implement a semantic chunker that splits when consecutive sentence embedding similarity drops below a threshold.


7. Chunk JSON serileştirme / Chunk.to_dict() and Chunk.from_dict()

Issue: https://github.com/AbuzerHarunOzarslan/turkrag/issues/7

Zorluk / Difficulty: kolay / easy · Etiketler / Labels: good first issue, chunking

Ne yapılacak?
src/turkrag/chunking/base.py içindeki Chunk frozen dataclass'ına to_dict(self) -> dict ve classmethod from_dict(cls, data: dict) -> Chunk ekleyin. Tüm alanlar (text, start, end, index, metadata) dönüşmeli.

Hangi dosyalar? - src/turkrag/chunking/base.py

Nasıl test edilir? - tests/chunking/test_chunkers.py'ye round-trip testi ekleyin: chunk = Chunk(...); assert Chunk.from_dict(chunk.to_dict()) == chunk. - uv run pytest tests/chunking/test_chunkers.py

Kabul ölçütleri / Acceptance criteria: - [ ] Metotlar eklendi ve round-trip çalışıyor - [ ] Metadata (dict) de doğru dönüyor - [ ] uv run pytest / uv run ruff check . / uv run mypy temiz

EN: Add JSON serialization helpers to the Chunk dataclass.


8. SnowballStemmer için protected_words / protected_words for SnowballStemmer

Issue: https://github.com/AbuzerHarunOzarslan/turkrag/issues/8

Zorluk / Difficulty: kolay / easy · Etiketler / Labels: good first issue, stem

Ne yapılacak?
src/turkrag/stem/snowball.py içindeki SnowballStemmer sınıfına protected_words: set[str] | None = None parametresi ekleyin. Bu kelimeler stemlenmeden aynen döndürülsün (örn. "türkiye" → "türkiye" yerine "türki" olmasın).

Hangi dosyalar? - src/turkrag/stem/snowball.py

Nasıl test edilir? - tests/stem/test_stemmers.py'ye test ekleyin: stemmer = SnowballStemmer(protected_words={"türkiye"}); assert stemmer.stem("türkiye") == "türkiye". - uv run pytest tests/stem/test_stemmers.py

Kabul ölçütleri / Acceptance criteria: - [ ] Parametre eklendi, korunan kelimeler stemlenmiyor - [ ] Contract testleri (test_contract.py) hâlâ geçiyor - [ ] uv run pytest / uv run ruff check . / uv run mypy temiz

EN: Add a protected_words set to SnowballStemmer to skip stemming for specific words (e.g., proper nouns).


9. Ağırlıklı skor füzyonu / Weighted score fusion alternative to RRF

Issue: https://github.com/AbuzerHarunOzarslan/turkrag/issues/9

Zorluk / Difficulty: orta / medium · Etiketler / Labels: good first issue, retrieval

Ne yapılacak?
HybridRetriever sınıfına fusion: Literal["rrf", "weighted"] = "rrf" parametresi ekleyin. "weighted" modunda: her retriever'in skorlarını min-max normalize edin, weights ile çarpıp toplayın. reciprocal_rank_fusion fonksiyonu korunacak, yeni weighted_score_fusion eklenecek.

Hangi dosyalar? - src/turkrag/retrieval/fusion.py

Nasıl test edilir? - tests/retrieval/test_vector_hybrid.py'ye fusion="weighted" testi ekleyin: skorları bilinen iki sahte (fake) retriever ile normalize edilmiş ağırlıklı toplamın beklenen sırayı verdiğini doğrulayın. - uv run pytest tests/retrieval/test_vector_hybrid.py

Kabul ölçütleri / Acceptance criteria: - [ ] fusion parametresi eklendi, iki mod çalışıyor - [ ] Min-max normalizasyon + ağırlıklı toplam doğru - [ ] uv run pytest / uv run ruff check . / uv run mypy temiz

EN: Add a weighted-score fusion mode (min-max normalized) as an alternative to RRF in HybridRetriever.


10. Benchmark'a BAAI/bge-m3 eklenmesi / Add BAAI/bge-m3 to benchmark

Issue: https://github.com/AbuzerHarunOzarslan/turkrag/issues/10

Zorluk / Difficulty: kolay / easy · Etiketler / Labels: good first issue, benchmark

Ne yapılacak?
bench/configs/models/ altına bge-m3.yaml oluşturun (keys: name, model_id, query_prefix, document_prefix, batch_size, model_kwargs, license, params_millions, notes). Lisansı Hugging Face sayfasından doğrulayın. turkrag-bench run --models bge-m3 çalıştırın, sonuçları commit edin.

Hangi dosyalar? - bench/configs/models/bge-m3.yaml (yeni) - bench/results/*.json ve bench/LEADERBOARD.md (turkrag-bench run otomatik üretir)

Nasıl test edilir? - turkrag-bench run --models bge-m3 --limit-queries 5 (hızlı doğrulama), ardından tam çalıştırma: turkrag-bench run --models bge-m3 - bench/results/ altındaki yeni JSON dosyalarını PR'a ekleyin - turkrag-bench leaderboard → tabloda bge-m3 satırları görünmeli - uv run pytest tests/bench/test_bench.py

Kabul ölçütleri / Acceptance criteria: - [ ] YAML dosyası doğru formatta, lisans doğrulandı - [ ] Benchmark çalışıyor, leaderboard'a ekleniyor - [ ] uv run pytest / uv run ruff check . / uv run mypy temiz

EN: Add a model config YAML for BAAI/bge-m3, verify license, run bench, commit results.


11. Benchmark'a ytu-ce-cosmos/turkish-e5-large eklenmesi / Add ytu-ce-cosmos/turkish-e5-large to benchmark

Issue: https://github.com/AbuzerHarunOzarslan/turkrag/issues/11

Zorluk / Difficulty: kolay / easy · Etiketler / Labels: good first issue, benchmark

Ne yapılacak?
Madde 10 ile aynı adımlar: turkish-e5-large.yaml oluşturun, lisansı kontrol edin, turkrag-bench run --models turkish-e5-large çalıştırın, sonuçları commit edin.

Hangi dosyalar? - bench/configs/models/turkish-e5-large.yaml (yeni) - bench/results/*.json ve bench/LEADERBOARD.md (otomatik üretilir)

Nasıl test edilir? - turkrag-bench run --models turkish-e5-large --limit-queries 5, ardından tam çalıştırma: turkrag-bench run --models turkish-e5-large - turkrag-bench leaderboard - uv run pytest tests/bench/test_bench.py

Kabul ölçütleri / Acceptance criteria: - [ ] YAML dosyası doğru, lisans doğrulandı - [ ] Benchmark çalışıyor, leaderboard'a ekleniyor - [ ] uv run pytest / uv run ruff check . / uv run mypy temiz

EN: Add a model config YAML for ytu-ce-cosmos/turkish-e5-large, verify license, run bench, commit results.


12. TR-MTEB'den yeni veri seti / Add another Turkish retrieval dataset from TR-MTEB

Issue: https://github.com/AbuzerHarunOzarslan/turkrag/issues/12

Zorluk / Difficulty: orta / medium · Etiketler / Labels: good first issue, benchmark

Ne yapılacak?
TR-MTEB'deki herhangi bir Türkçe retrieval veri setini seçin (contributor belirler). Lisansını doğrulayın. src/turkrag/bench/datasets.py'a @register_dataset("name", info) ekleyin, bench/datasets/<name>.md data card yazın. load_mteb_retrieval loader'ını kullanın.

Hangi dosyalar? - src/turkrag/bench/datasets.py - bench/datasets/<name>.md (yeni)

Nasıl test edilir? - turkrag-bench list → yeni veri seti listelenmeli - turkrag-bench run --datasets <name> --limit-queries 3 - uv run pytest tests/bench/test_bench.py

Kabul ölçütleri / Acceptance criteria: - [ ] Veri seti kayıtlı, data card var, lisans uygun - [ ] Benchmark çalışıyor - [ ] uv run pytest / uv run ruff check . / uv run mypy temiz

EN: Register a new Turkish retrieval dataset from TR-MTEB (contributor picks), verify license, add data card, make it runnable in bench.


13. Leaderboard'a stemmer etkisi pivot tablosu / Leaderboard: stemmer effect pivot table

Issue: https://github.com/AbuzerHarunOzarslan/turkrag/issues/13

Zorluk / Difficulty: kolay / easy · Etiketler / Labels: good first issue, benchmark

Ne yapılacak?
src/turkrag/bench/leaderboard.py içindeki render_leaderboard() fonksiyonuna BM25 nDCG@10 skorlarını stemmer × chunker pivot tablo olarak ekleyin (satır: stemmer, sütun: chunker, hücre: nDCG@10).

Hangi dosyalar? - src/turkrag/bench/leaderboard.py

Nasıl test edilir? - turkrag-bench leaderboard → markdown çıktısında pivot tablo gözükmeli - uv run pytest tests/bench/test_bench.py

Kabul ölçütleri / Acceptance criteria: - [ ] Pivot tablo render ediliyor, format düzgün - [ ] Mevcut leaderboard bozulmuyor - [ ] uv run pytest / uv run ruff check . / uv run mypy temiz

EN: Add a stemmer × chunker pivot table (BM25 nDCG@10) to the rendered leaderboard markdown.


14. turkrag-bench dry-run modu / turkrag-bench run --dry-run

Issue: https://github.com/AbuzerHarunOzarslan/turkrag/issues/14

Zorluk / Difficulty: kolay / easy · Etiketler / Labels: good first issue, benchmark

Ne yapılacak?
CLI'ye --dry-run bayrağı ekleyin (src/turkrag/bench/cli.py). Bu modda model/data yüklenmeden, çalıştırılacak grid hücreleri (dataset × chunker × stemmer × retriever × model) konsola yazdırılsın.

Hangi dosyalar? - src/turkrag/bench/cli.py - src/turkrag/bench/runner.py (grid üretimi ayrıştırılabilir hale getirilecek)

Nasıl test edilir? - turkrag-bench run --dry-run --chunkers none --stemmers snowball --retrievers bm25,hybrid --models multilingual-e5-small → 2 hücre yazdırılmalı (bm25 ve hybrid) - tests/bench/test_bench.py: main(["run", "--dry-run", ...]) çıktısını capsys ile doğrulayın - uv run pytest tests/bench/test_bench.py

Kabul ölçütleri / Acceptance criteria: - [ ] --dry-run bayrağı eklendi, grid hücreleri basılıyor - [ ] Model/data yüklenmiyor - [ ] uv run pytest / uv run ruff check . / uv run mypy temiz

EN: Add a --dry-run flag that prints the execution grid without loading models or data.


15. LlamaIndex rehber sayfası ve örnek / LlamaIndex guide page + example

Issue: https://github.com/AbuzerHarunOzarslan/turkrag/issues/15

Zorluk / Difficulty: kolay / easy · Etiketler / Labels: good first issue, docs, integrations

Ne yapılacak?
docs/guide/llamaindex.md (yeni) yazın: TurkishNodeParser.from_defaults(max_chars=800, overlap_sentences=1) ile Türkçe belgeleri node'lara bölme ve bu node'ları LlamaIndex'in kendi indekslerinde (ör. yerel bir embedding modeliyle VectorStoreIndex) kullanma. examples/llamaindex_quickstart.py (yeni) ile çalışan bir demo ekleyin ve sayfayı mkdocs.yml içindeki nav bölümüne ekleyin. (Not: TurkRAGRetriever LangChain içindir.)

Hangi dosyalar? - docs/guide/llamaindex.md (yeni) - examples/llamaindex_quickstart.py (yeni) - mkdocs.yml (nav güncelleme)

Nasıl test edilir? - uv run mkdocs build --strict → hata olmamalı - uv run python examples/llamaindex_quickstart.py hatasız çalışmalı (uv sync --extra llamaindex)

Kabul ölçütleri / Acceptance criteria: - [ ] Rehber sayfası ve örnek eklendi, mkdocs build geçiyor - [ ] Örnek kod TurkishNodeParser kullanıyor ve çalışıyor - [ ] uv run ruff check . temiz

EN: Add a docs page and a runnable example showing how to use TurkishNodeParser with LlamaIndex indexes.